Programming for interoperation with IBM MQ
There are some differences between the WebSphere Application Server environment and the IBM MQ environment. If we are writing messaging programs that interoperate between these two environments, we should be aware of these differences and take them into account when designing, coding and deploying your programs.
Tasks
- Learn more about the environment differences and other relevant concepts in How messages are passed between service integration and an IBM MQ network.
- Read about designing programs that interoperate with IBM MQ in Designing an application for interoperation with IBM MQ.
Subtopics
- Designing an application for interoperation with IBM MQ
To design an application to interoperate with queue managers in an IBM MQ network we need to first consider the differences between the two environments, then design your JMS client based on the Java EE pattern, then identify any name-handling incompatibilities between the service integration bus and IBM MQ environments, then define the topic mappings.- Mapping the message body to and from IBM MQ format
The IBM MQ message header (MQRFH2) and descriptor (MQMD) can contain information about the format of the IBM MQ message body. Service integration uses information contained in the MQRFH2 and MQMD when converting a message from IBM MQ format, and puts information into the QRFH2 and MQMD when converting a message to IBM MQ format.- Mapping the message header fields and properties to and from IBM MQ format
When service integration converts a message to IBM 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 IBM MQ format, it sets the service integration message header fields and properties from the MQMD and the MQRFH2 in the IBM MQ message.- Mapping the JMS delivery option and message reliability to and from the IBM MQ persistence value
When converting messages between IBM 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 IBM MQ queues, topics, and destinations
Service integration messages and IBM 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 IBM 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 IBM 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 IBM MQ message header (MQRFH2), there are additional fields specific to the service integration bus and that allow for functions that are not used in IBM MQ. When IBM 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 IBM MQ.- How to process IBM MQ message headers
IBM MQ messages can optionally include additional headers, or alternative headers, to the MQRFH2 header, which contains JMS properties. WAS application programs can use the com.ibm.mq.headers classes to access headers in messages from IBM MQ and to construct headers in messages to IBM MQ.- IBM MQ functions not supported by service integration
There are various functions available in an IBM MQ network that are not available on a service integration bus.