WAS v8.5 > Develop applications > Develop Messaging resources > Programming to use asynchronous messaging > Programming for interoperation with WebSphere MQDesigning an application for interoperation with WebSphere MQ
To design an application to interoperate with queue managers in a WebSphere MQ network you 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 WebSphere MQ environments, then define the topic mappings.
Identify the WebSphere MQ queues with which the applications will interoperate. The exact names and locations can be left to the installation.
- Familiarize yourself with important reference information for the two interoperating environments, WebSphere MQ and the service integration bus.
There are three types of reference material:
- For mapping that is unique to service integration bus messaging, see Map additional MQRFH2 header fields in service integration.
- For mapping between WAS service integration bus messaging and WebSphere MQ, see How service integration converts messages to and from WebSphere MQ format and Map additional MQRFH2 header fields in service integration.
- For the differences between the WebSphere MQ functions and the service integration bus, see WebSphere MQ functions not supported by service integration.
- Design your JMS client based on the typical Java EE pattern:
- Use JNDI to find a ConnectionFactory object.
- Use JNDI to find one or more Destination objects.
- Use the connection factory to create a JMS Connection object.
- Use the JMS connection to create one or more JMS Session objects.
- Use a JMS session and the destinations to create the MessageProducer and MessageConsumer objects.
- Start delivery of messages by starting the JMS connection.
At this point a client has the basic JMS setup needed to produce and consume messages.
- Identify any name-handling incompatibilities between the service integration bus and WebSphere MQ environments. If necessary, identify alias requirements, so the WebSphere MQ application can handle service integration bus destination names of greater than 48 characters. For more information, see How to address bus destinations and WebSphere MQ queues.
- Identify any reply destinations used by the application and check them for name-handling incompatibilities. For more information, see Map destinations to and from WebSphere MQ queues, topics, and destinations.
- If the application publishes messages to be forwarded to WebSphere MQ brokers, work with your administrator to define appropriate topic mappings on a publish/subscribe broker profile. You must also define topic mappings for any permanent reply topics. See Reply-to topics for request-reply messaging through a WebSphere MQ link and Request-reply messaging through a WebSphere MQ link for more information.