The Cluster Queue Monitoring sample program (AMQSCLM)

This sample uses the built-in IBM MQ cluster workload balancing features to direct messages to instances of queues that have consuming applications attached. This automatic direction prevents the build-up of messages on an instance of a cluster queue to which no consuming application is attached.


Overview

We can set up a cluster that has more than one definition for the same queue on different queue managers. This configuration provides the benefit of increased availability and workload balancing. However, there is no capability built into IBM MQ to dynamically modify the distribution of messages across a cluster based on the state of attached applications. For this reason, a consuming application must always be attached to every instance of a queue to ensure that messages are processed.

The cluster queue monitoring sample program monitors the state of attached applications. The program dynamically adjusts the built-in workload balancing configuration to direct messages to instances of a clustered queue with consuming applications attached. In certain situations this program can be used to relax the need for a consuming application to always be connected to every instance of a queue. It also resends messages that become queued on an instance of a queue with no consuming applications attached. Resending messages enables messages to be routed around a consuming application that is temporarily shut down.

The program is designed to be used where the consuming applications are long running applications, rather than frequently attaching and detaching applications.

The cluster queue monitoring sample program is the compiled executable program of the C sample file amqsclma.c.

Further information about clusters and workload can be found in Use clusters for workload management

  • AMQSCLM: Design and Planning for using the sample
    Information about how the cluster queue monitoring sample program works, points to consider when setting up a system for the sample program to run on, and modifications that can be made to the sample source code.
  • AMQSCLM: Preparing and running the sample
    The cluster queue monitoring sample can either be run locally connected to a queue manager, or as a client connected over a channel. The sample should be running whenever the queue manager is running, when running locally it can be configured as a queue manager service to automatically start and stop the sample with the queue manager.
  • AMQSCLM: Troubleshooting
    The following sections contain information about scenarios that might be encountered while using the sample. Information about potential explanations for a scenario, and options on how to resolve it, are provided.

Parent topic: Use the sample programs on Multiplatforms