Home

 

Reply-to queue alias walk-through

 

To complete this example, let us take a walk through the process, from an application putting a message on a remote queue at queue manager ‘QM1’, through to the same application removing the reply message from the alias reply-to queue.

  1. 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)

  2. 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.

  3. 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’) and puts them into the reply-to fields of the message descriptor.

  4. 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’.

  5. 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’.

  6. The message arrives at queue manager ‘QM2’, and is placed on the ‘Inquiry’ local queue.

  7. 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. This is:

    Reply-to queue name Answer
    Reply-to queue manager name QM1_relief

  8. Queue manager ‘QM2’ carries out the put command, and 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’.

  9. The message is transferred to queue manager ‘QM1’ where the queue manager, recognizing that the queue manager name ‘QM1_relief’ is an alias, extracts from the alias definition ‘QM1_relief’ the physical queue manager name ‘QM1’.

  10. Queue manager ‘QM1’ then puts the message on the queue name contained in the transmission header, ‘Answer’.

  11. The application extracts its reply message from the queue ‘Answer’.

 

Parent topic:

Reply-to queue


ic11030_


 

Home