To design an application to interoperate with queue managers
in a IBM 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 IBM MQ environments,
then define the topic mappings.
Before you begin
Identify the IBM MQ queues
with which your applications will interoperate. The exact names and
locations can be left to the installation.
Procedure
- Familiarize yourself with important reference information
for the two interoperating environments, IBM MQ and the service integration
bus.
There are three types of reference material:
- 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 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. For
more information, see How to address bus destinations and IBM MQ queues.
- Identify any reply destinations that are used by your application
and check them for name-handling incompatibilities. For more information,
see Mapping destinations to and from IBM MQ queues, topics, and destinations.
- If your application publishes messages that you want to
be forwarded to IBM 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 IBM MQ link and Request-reply messaging through a IBM MQ link for
more information.