Programming for interoperation with WebSphere MQ
There are some differences between the WAS environment and the WebSphere MQ environment. If we are writing messaging programs that interoperate between these two environments, you should be aware of these differences and take them into account when designing, coding and deploying the programs.
- Learn more about the environment differences and other relevant concepts in How messages are passed between service integration and a WebSphere MQ network.
- Read about designing programs that interoperate with WebSphere MQ in Design an application for interoperation with WebSphere MQ.
Subtopics
- Design an application for interoperation with WebSphere MQ
To design an application to interoperate with queue managers in a WebSphere MQ network we need to first consider the differences between the two environments, then design the JMS client based on the Java EE pattern, then identify any name-handling incompatibilities between the service integration bus and WebSphere MQ environments, then define the topic mappings.
- Mapping the message body to and from WebSphere MQ format
The WebSphere MQ message header (MQRFH2) and descriptor (MQMD) can contain information about the format of the WebSphere MQ message body. Service integration uses information contained in the MQRFH2 and MQMD when converting a message from WebSphere MQ format, and puts information into the MQRFH2 and MQMD when converting a message to WebSphere MQ format.
- Mapping the message header fields and properties to and from WebSphere MQ format
When service integration converts a message to WebSphere MQ format, it sets fields in the MQMD and the MQRFH2 based on the service integration message header fields and properties; these include JMS message header fields and properties applicable to the message. When service integration converts a message from WebSphere MQ format, it sets the service integration message header fields and properties from the MQMD and the MQRFH2 in the WebSphere MQ message.
- Mapping the JMS delivery option and message reliability to and from the WebSphere MQ persistence value
When converting messages between WebSphere MQ format and service integration format, service integration processes the message header fields and properties relating to message delivery mode, reliability, and persistence.
- Mapping destinations to and from WebSphere MQ queues, topics, and destinations
Service integration messages and WebSphere MQ messages both contain header fields and properties. Some of these header fields and properties contain destinations or destination properties that provide information about send-to and reply-to destinations, and about destinations in the bus forward and reverse routing paths. Because service integration and WebSphere MQ have different definitions for destinations, mappings are used to process the destinations and destination properties when messages are converted between service integration format and WebSphere MQ format.
- Mapping MQMD Report fields to JMS provider-specific properties
JMS applications can use report messages as a form of managed request/response processing, to give remote feedback to producers on the outcome of their send operations and the fate of their messages. A JMS application can request different types of report message by setting JMS_IBM_Report_Xxxx message properties and options.
- Mapping additional MQRFH2 header fields in service integration
In the WebSphere MQ message header (MQRFH2), there are additional fields that are specific to the service integration bus and that allow for functions that are not used in WebSphere MQ. When WebSphere MQ transports a message from one service integration bus to another service integration bus, these fields convey information that can be used by service integration applications but is not required by WebSphere MQ.
- How to process WebSphere MQ message headers
WebSphere MQ messages can optionally include additional headers, or alternative headers, to the MQRFH2 header, which contains JMS properties. WebSphere Application Server application programs can use the com.ibm.mq.headers classes to access headers in messages from WebSphere MQ and to construct headers in messages to WebSphere MQ.
- WebSphere MQ functions not supported by service integration
There are various functions available in a WebSphere MQ network that are not available on a service integration bus.