WebSphere MQ multiple instances

WebSphere® MQ supports the creation of a multi-instance queue manager. A multi-instance queue manager restarts a WebSphere MQ (MQSeries) server instance automatically on a standby server when the active instance goes down.

For the use case described in this topic:

  • WebSphere MQ is installed on two servers.
  • One queue manager, QM1, has been created.
  • One instance of QM1 is active, and is running on one server.
  • The other instance of QM1 is running in standby mode on the other server. This server performs no active processing, but is ready to take over from the active instance of QM1, if the active instance fails.

It is important to take into account the time required for the standby instance of a multi-instance queue manager to become active after the active instance becomes unavailable. Preliminary tests indicate that the required time may vary between 30 seconds and two minutes, depending on configuration and reason for failure.

Set up WebSphere MQ

To use a WebSphere MQ queue manager as a multi-instance queue manager:

  1. Use the crtmqm command to create a single queue manager on one of the servers.
  2. Place the queue manager data and logs in shared network storage directory.
  3. On the other server, rather than create the queue manager again, use the addmqinf command to create a reference to the queue manager data and logs on the network storage.
  4. All the connection information for the standby server must be the same as for the main server, including the port.

Set up B2Bi

After you install the MQ multi-instance queue manager, you must configure B2Bi to use the multiple instances. To do this you can create a new pickup or modify an existing pickup.

New pickup or delivery

  1. Log on to the B2Bi user interface.
  2. Create an IBM MQ pickup or delivery (application or trading partner).
  3. During the MQ pickup or delivery creation, the creation wizard displays the Settings page. On this page:
  4. Enter settings for the main MQSeries server.
  5. Select the option Multi-instance queue manager. When you select this option, the following field is displayed: MQSeries standby server. Enter the standby server address.
  6. Click Save.

Existing pickup

Alternatively, you can add the multi-queue instance to an existing IBM MQ pickup. To do this:

  1. Open the modification page for an existing MQSeries pickup or delivery.
  2. Select the IBM MQSeries settings tab.
  3. Select the option Multi-instance queue manager. When you select this option, the following field is displayed: MQSeries standby server.
  4. Enter the standby server address.
  5. Click Save changes.

How the multi-instance functions

B2Bi tries to send or receive every message to the last functional WebSphere MQ (MQSeries) server. WebSphere MQ has a cache where the status for each exchange point is registered. If the primary instance crashes, B2Bi automatically tries to connect to the standby instance. If the standby is not running, the message is re-queued. The message is then held for a new retry. This provides time for the standby instance to become active. If the standby is still not available, the message goes through additional re-queue and retries. The time between the retries increases for each queue/retry cycle. When the maximum number of retries is reached (defined in the queue manager configuration), the message is rejected.

During the period when neither of the WebSphere MQ server instances is available, B2Bi tries to connect to the primary and to the secondary server on each retry. After a connection is successfully made to a server instance, the WebSphere MQ cache is updated. In the cache, the last functional host for the exchange point is specified, so that all future messages are exchanged directly with the active WebSphere MQ server.

Related Links