+

Search Tips   |   Advanced Search

Design 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.

Identify the IBM MQ queues with which the applications will interoperate. The exact names and locations can be left to the installation.


Tasks

  1. Familiarize ourself with important reference information for the two interoperating environments, IBM MQ and the service integration bus.

    There are three types of reference material:

  2. Design your JMS client based on the typical Java EE pattern:

    1. Use JNDI to find a ConnectionFactory object.

    2. Use JNDI to find one or more Destination objects.

    3. Use the connection factory to create a JMS Connection object.

    4. Use the JMS connection to create one or more JMS Session objects.

    5. Use a JMS session and the destinations to create the MessageProducer and MessageConsumer objects.

    6. 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.

  3. Identify any name-handling incompatibilities between the service integration bus and IBM MQ environments. If necessary, identify alias requirements, so that the IBM MQ application can handle service integration bus destination names of greater than 48 characters. See How to address bus destinations and IBM MQ queues.
  4. Identify any reply destinations used by the application and check them for name-handling incompatibilities. For more information, see Mapping destinations to and from IBM MQ queues, topics, and destinations.

  5. If the application publishes messages to be forwarded to IBM MQ brokers, work with your administrator to define appropriate topic mappings on a publish/subscribe broker profile. We must also define topic mappings for any permanent reply topics. See Reply-to topics for request-reply messaging through an IBM MQ link and Request-reply messaging through an IBM MQ link for more information.