Using different transfer modes to a single queue

Suppose you have a queue MY_Q_ASYNC on queue manager MQE1. Messages are passed to MY_Q_ASYNC by a different queue manager MQE2, using a remote queue definition that is defined as an asynchronous queue. Now suppose your application periodically wants to get messages in a synchronous manner from the MY_Q_ASYNC queue.

The recommended way to achieve this is to add an alias to the MY_Q_ASYNC queue, perhaps called MY_Q_SYNC. Then define a remote queue definition on your MQE2 queue manager, that references the MY_Q_SYNC queue. This provides you with two remote queue definitions. If you use the MY_Q_ASYNC definition, the messages are transported asynchronously. If you use the MY_Q_SYNC definition, synchronous message transfer is used.

Figure 1. Two modes of transfer to a single queue
Diagram shows a queue MY_Q_ASYNC on queue manager MQE1 and another queue manager MQE2 with two remote queue definitions, MY_Q_ASYNC and MY_Q_SYNC. Messages can be passed to MY_Q_ASYNC by queue manager MQE2 either asynchronously, using MY_Q_ASYNC, or synchronously, using MY_Q_SYNC.

Parent topic: Using queue aliases