Threading for IBM MQ

The IBM® MQ adapter is thread-safe on the Windows, AIX®, Sun, and HP platforms. However, due to the IBM MQ default system configuration parameters for queues and queue managers, the default IBM MQ resources might be insufficient to support multithreading with the IBM MQ adapter.

When operating in the multithreaded mode, the Launcher executes one thread for each map being concurrently executed. In addition to the map thread, the IBM MQ queue manager connection for each distinct queue manager on a source or target card requires a separate connection thread. Because IBM MQ does not allow connection sharing between threads, each map thread maintains its own set of connection threads.

In addition to the map and connection threads, the IBM MQ system spawns threads to service internal requests and processes. The result is that, as the number of concurrent maps increases, the use of IBM MQ and system resources multiplies. When the system resources exceed a threshold based upon the IBM MQ and system configuration settings, the excessive thread context-switching and system memory resource allocation can significantly reduce the efficiency of the overall IBM MQ message throughput.

In addition to the reduction in efficiency, it is possible that when the IBM MQ systems resources are exceeded, the IBM MQ behavior can become unpredictable and can result in messages being ignored on event queues.

To address these limitations, the following recommendations should be implemented: