Table of Contents
Just a second...

DEPRECATED: Processing a request-reply message with a Diffusion client

A common pattern among JMS solutions is for a client to receive a message from JMS and a reply is expected to be sent to a specific JMS topic or queue.

Note: The JMS Adapter v5.1 is now deprecated. Use the new JMS adapter instead. For more information, see JMS.

Typically, the JMS publisher creates and sends a message with the JMSReplyTo header set to some other destination defined within the JMS server. This can be a topic, queue, or a temporary topic or temporary queue. The Diffusion™ client does not have to know the destination type as this is handled within the adapter.

  1. The Diffusion client subscribes to topic jms/queue/ABC.
  2. The JMS provider creates a temporary queue, XYZ, and subscribes to it.
  3. The JMS provider sends a message to the queue ABC with JMSReplyTo set to the queue XYZ.
  4. The Diffusion client receives a message on queue jms/topic/ABC, with DiffusionReplyTo set to jms/reply/XYZ.
  5. The Diffusion client sends a response message to the queue jms/reply/XYZ.
  6. The JMS provider receives a TextMessage on the temporary queue XYZ.
    Figure 1. Request-reply initiated by a JMS client and serviced by a Diffusion client The Diffusion client subscribes to the topic "jms/queue/ABC" on the Diffusion server. The Diffusion server binds the "jms/queue/ABC" to the JMS queue "ABC". The JMS client creates a temporary queue, for example "ABC", on the JMS server. The JMS client creates a consumer for "XYZ" on the JMS server. The JMS client sends a text message to "ABC" queue on the JMS server with the reply queue set to "XYZ". The JMS server sends the text message from the "ABC" queue to the Diffusion server with reply queue set to "XYZ". The Diffusion server looks up the binding between the queue "ABC" and the topic "jms/queue/ABC". The Diffusion server creates a binding between queue "XYZ" and the topic "jms/reply/XYZ". The Diffusion server sends a topic message to the "jms/queue/ABC" topic on the Diffusion client with the reply topic set to "jms/reply/XYZ". The Diffusion client sends a response topic message to the "jms/reply/XYZ" topic on the Diffusion server. The Diffusion server looks up the binding between the "jms/reply/XYZ" topic and the "XYZ" JMS queue. The Diffusion server sends a text message to the "XYZ" JMS queue on the JMS server. The JMS server sends the text message to the "XYZ" queue on the JMS client.