Reply-to queue alias walk-through
A walk-through of the process from an application putting a message on a remote queue through to the same application removing the reply message from the alias reply-to queue.
To complete this example, let us look at the process.
- The application opens a queue named 'Inquiry', and puts messages to it. The application sets the reply-to fields of the message descriptor to:
Reply-to queue name Answer_alias Reply-to queue manager name (blank) - Queue manager 'QM1' responds to the blank queue manager name by checking for a remote queue definition with the name 'Answer_alias'. If none is found, the queue manager places its own name, 'QM1', in the reply-to queue manager field of the message descriptor.
- If the queue manager finds a remote queue definition with the name 'Answer_alias', it extracts the queue name and queue manager names from the definition (queue name='Answer' and queue manager name= 'QM1_relief'). It then puts them into the reply-to fields of the message descriptor.
- The queue manager 'QM1' uses the remote queue definition 'Inquiry' to determine that the intended destination queue is at queue manager 'QM2', and the message is placed on the transmission queue 'QM2'. 'QM2' is the default transmission queue name for messages destined for queues at queue manager 'QM2'.
- When queue manager 'QM1' puts the message on the transmission queue, it adds a transmission header to the message. This header contains the name of the destination queue, 'Inquiry', and the destination queue manager, 'QM2'.
- The message arrives at queue manager 'QM2', and is placed on the 'Inquiry' local queue.
- An application gets the message from this queue and processes the message. The application prepares a reply message, and puts this reply message on the reply-to queue name from the message descriptor of the original message:
Reply-to queue name Answer Reply-to queue manager name QM1_relief - Queue manager 'QM2' carries out the put command. Finding that the queue manager name, 'QM1_relief', is a remote queue manager, it places the message on the transmission queue with the same name, 'QM1_relief'. The message is given a transmission header containing the name of the destination queue, 'Answer', and the destination queue manager, 'QM1_relief'.
- The message is transferred to queue manager 'QM1'. The queue manager, recognizes that the queue manager name 'QM1_relief' is an alias, extracts from the alias definition 'QM1_relief' the physical queue manager name 'QM1'.
- Queue manager 'QM1' then puts the message on the queue name contained in the transmission header, 'Answer'.
- The application extracts its reply message from the queue 'Answer'.
Parent topic: Reply-to queue