To configure a very basic installation of the MQ bridge complete the following
steps:
- Make sure you have an MQ system installed and that you understand local
routing conventions, and how to configure the system.
- Install MQe on a system (it can be on the same system as MQ)
- If MQ Classes for Java™ is not already installed, download
it from the Web and install it on the MQ system.
- Set up your MQe system and verify that it is working properly before you
try to connect it to MQ.
- Update the MQe_java\Classes\JavaEnv.bat file so that
it points to the Java classes that are part of the MQ Classes for Java,
and to the classpath for your JRE (Java Runtime Environment). Ensure that the SupportPac™ MA88
.jar files are in the classpath, and that the java\lib and \bin directories
are in your path. This is set by the MQE_VM_OPTIONS_LOCN which
should be set to point to the vm_options.txt file during
installation.
- Plan the routing you intend to implement. You need to decide which MQ
queue managers are going to talk to which MQe queue managers.
- Decide on a naming convention for MQe objects and MQ objects and document
it for future use.
- Modify your MQe system to define an MQ bridge on your chosen MQe server.
See Java
Programming Reference for information on using examples.mqbridge.awt.AwtMQBridgeServer to
define a bridge.
- Connect the chosen MQ queue manager to the bridge on the MQe server as
follows:
- On the MQ queue manager:
- Define one or more Java server connections so that MQe can
use the MQ Classes for Java to talk to this queue manager. This
involves the following steps:
- Define the server connections
- Define a sync queue for MQe to use to provide assured delivery to the
MQ system. You need one of these for each server connection that the MQe system
can use.
- On the MQe server:
- Define an MQ queue manager proxy object which holds information about
the MQ queue manager. This involves the following steps:
- Collect the Hostname of the MQ queue manager.
- Put the name in the MQ queue manager proxy object.
- Define a Client Connection object that holds information about how to
use the MQ Classes for Java to connect to the server connection
on the MQ system. This involves the following steps:
- Collect the Port number, and all other server connection parameters.
- Use these values to define the client connection object so that they match
the definition on the MQ queue manager.
- Modify your configuration on both MQe and MQ to allow messages to pass
from MQ to MQe.
- Decide on the number of routes from MQ to your MQe network. The number
of routes you need depends on the amount of message traffic (load) you use
across each route. If your message load is high you may wish to split your
traffic into multiple routes.
- Define your routes as follows:
- For each route define a transmission queue on your MQ system. DO NOT define
a connection for these transmission queues.
- For each route create a matching transmission queue listener on your MQe
system.
- Define a number of remote queue definitions, (such as remote queue manager
aliases and queue aliases) to allow MQ messages to be routed onto the various
MQe-bound transmission queues that you defined in step b. 1.
- Modify your configuration on MQe to allow messages to pass from MQe to
MQ:
- Publish details about all the queue managers on your MQ network you want
to send messages to from the MQe network. Each MQ queue manager requires a
connections definition on your MQe server. All fields except the Queue manager
name should be null, to indicate that the normal MQe communications connections
should not be used to talk to this queue manager.
- Publish details about all the queues on your MQ network you want to send
messages to from the MQe network. Each MQ queue requires an MQ bridge queue
definition on your MQe server. This is the MQe equivalent of a DEFINE
QREMOTE in MQ.
- The queue name is the name of the MQ queue to which the bridge should
send any messages arriving on this MQ bridge queue.
- The queue manager name is the name of the MQ queue manager on which the
queue is located.
- The bridge name indicates which bridge should be used to send messages
to the MQ network.
- The MQ queue manager proxy name is the name of the MQ queue manager proxy
object, in the MQe configuration, that can connect to an MQ queue manager.
- The MQ queue manager should have a route defined to allow messages to
be posted to the Queue Name on Queue Manager Name to
deliver the message to its final destination.
- Start your MQ and MQe systems to allow messages to flow. The MQ system
client channel listener must be started. All the objects you have defined
on the MQe must be started. These objects can be started in any of the following
ways:
- Explicitly using the Administration GUI described in MQe Configuration
Guide.
- Configuring the rules class, as described in MQe System Programming Guide,
to indicate the startup state (running or stopped), and restarting the MQe
server
- A mixture of the two previous methods
The simplest way to start objects manually, is to send a start command
to the relevant bridge object. This command should indicate that all the children
of the bridge, and children's children should be started as well. - To allow messages to pass from MQe to MQ, start the client connection
objects in MQe.
- To allow messages to pass from MQ to MQe, start both the client connection
objects, and the relevant transmission queue listeners.
- Create transformer classes, and modify your MQe configuration to use them.
A transformer class converts messages from MQ message formats into an MQe
message format, and vice versa. These format-converters must be written in Java and
configured in several places in the MQ bridge configuration.
- Create transformer classes
- Determine the message formats of the MQ messages that need to pass over
the bridge.
- Write a transformer class, or a set of transformer classes
to convert each MQ message format into an MQe message. Transformers are not
directly supported by the C bindings. See Developing a basic application for
information about writing transformers in Java.
- You can replace the default transformer class. Use the administration
GUI to update the default transformer class parameter in
the bridge object's configuration.
- You can specify a non-default transformer for each MQ bridge queue definition.
Use the administration GUI to update the transformer field
of each MQ bridge queue in the configuration.
- You can specify a non-default transformer for each MQ transmission queue
listener. Use the administration GUI to update the transformer field
of each listener in the configuration.
- Restart the bridge, and listeners.