Reply-to queue and queue manager

There are occasions when you might receive messages in response to a message you send:

  • A reply message in response to a request message
  • A report message about an unexpected event or expiry
  • A report message about a COA (Confirmation Of Arrival) or a COD (Confirmation Of Delivery) event
  • A report message about a PAN (Positive Action Notification) or a NAN (Negative Action Notification) event

Use the MQMD structure, specify the name of the queue to which we want reply and report messages sent, in the ReplyToQ field. Specify the name of the queue manager that owns the reply-to queue in the ReplyToQMgr field.

If you leave the ReplyToQMgr field blank, the queue manager sets the contents of the following fields in the message descriptor on the queue:

    ReplyToQ
    If ReplyToQ is a local definition of a remote queue, the ReplyToQ field is set to the name of the remote queue; otherwise this field is not changed.

    ReplyToQMgr
    If ReplyToQ is a local definition of a remote queue, the ReplyToQMgr field is set to the name of the queue manager that owns the remote queue; otherwise the ReplyToQMgr field is set to the name of the queue manager to which the application is connected.

Note: We can request that a queue manager makes more than one attempt to deliver a message, and we can request that the message is discarded if it fails. If the message, after failing to be delivered, is not to be discarded, the remote queue manager puts the message on its dead-letter (undelivered message) queue (see Use the dead-letter (undelivered message) queue ). Parent topic: IBM MQ messages