Reply-to queues for request-reply messaging through a WebSphere MQ link

Reply-to queues indicate to a receiving application where a reply should be sent. We can use reply-to queues for point-to-point request messages (queues) and for publish/subscribe request messages.

The reply-to queue might be a predefined queue or a dynamically created temporary or permanent queue. If it is a dynamic queue, then it might have a unique name generated by WebSphere MQ. WAS messaging technology has the same concept of a temporary queue for replies, and generates a queue name of up to 48 characters to comply with the queue-name length limitation for WebSphere MQ.

Deciding to use reply-to queues is part of application design (see Designing an application for interoperation with WebSphere MQ). Your sending application must contain a definition of where replies are to be sent and attach this information to its messages. The replying application uses this data in the received message to discover the name of the queue to which to reply.

There are two fields in the JMS API used for sharing information about the destination to which a message is sent (JMSDestination) and the destination to which replies should be sent (JMSReplyTo). The JMSReplyTo field allows a response message to be returned if required. It contains enough detail for the receiving application to send a response message to the intended queue or topic so that it can be read by an application associated with the sender of the request. The JMSReplyTo field of a JMS message passing from a service integration bus to WebSphere MQ (or from WebSphere MQ to a service integration bus) is automatically mapped so that a consuming application in WebSphere MQ can reply to the original WAS application.


Related concepts:

How to address bus destinations and WebSphere MQ queues


+

Search Tips   |   Advanced Search