This topic outlines the steps you should consider when designing
an application that will interoperate with queue managers in a WebSphere MQ
network.
Before you begin
You should identify the WebSphere MQ queues that your applications
will interoperate with. The exact names and locations can be left to the installation.
Steps for this task
- Familiarize yourself with important reference information for the
two interoperating environments, WebSphere MQ environment and the service integration bus.
There are three types of reference material:
- Read about mapping unique to service integration bus messaging
in Mapping of additional MQRFH2 header fields in service integration.
- Read about mapping between WebSphere Application Server service integration bus messaging and WebSphere
MQ in Mapping between a WebSphere service integration bus and WebSphere MQ.
- Read about the differences between the WebSphere MQ functions
and the service integration bus in WebSphere MQ functions not supported by service integration
- Design your JMS client based on the typical J2EE pattern:
- Use JNDI to find a ConnectionFactory object.
- Use JNDI to find one or more Destination objects.
- Use the ConnectionFactory to create a JMS Connection.
- Use the Connection to create one or more JMS Sessions.
- Use a Session and the Destinations to create the MessageProducers
and MessageConsumers needed.
- Start delivery of messages by starting the 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 that the WebSphere MQ application can handle service integration
bus destination names of greater than 48 characters. See Issues relating to addressing bus destinations across the WebSphere MQ link for more information.
- Identify any reply destinations that are used by your application
and check them for name-handling incompatibilities.
- If your application publishes messages that you wish to be forwarded
to WebSphere MQ brokers, work with your administrator to define appropriate
topic mappings on a publish/subscribe broker profile. You will also need to
define topic mappings for any permanent reply topics. See How WebSphere MQ link handles reply-to topics and Request-reply across the WebSphere MQ link for
more information.