Table of Contents
Just a second...

DEPRECATED: Sending a request-reply message from a Diffusion client

You can send a message from a Diffusion™ client into a JMS server with the expectation that a JMS client processes the message and sends a response back to the same Diffusion client.

Note: The JMS Adapter v5.1 is now deprecated. Use the new JMS adapter instead. For more information, see JMS.
  1. The JMS client subscribes to messages on the queue ABC.
  2. The Diffusion client subscribes to jms/tmp/queue/XYZ. (Commonly, XYZ is a unique identifier).
  3. The Diffusion client sends a request message to jms/queue/ABC with the DiffusionReplyTo header set with the value jms/tmp/queue/XYZ.
  4. The JMS client receives the request message on queue ABC, with the JMSReplyTo header set to queue DEF.
  5. The JMS client sends a reply to queue DEF.
  6. The Diffusion client receives the reply on topic jms/tmp/queue/XYZ.
    Note: The return Diffusion topic can be any topic, so it is not necessary that the originating Diffusion client receives the reply – it can be any client listening for messages on that topic.
    Figure 1. Request-reply initiated by a Diffusion client and serviced by a JMS client The JMS client subscribes to queue "ABC". The Diffusion client subscribes to "jms/tmp/queue/XYZ". The Diffusion server creates a temporary queue "XYZ" on the JMS server. The Diffusion server binds the "XYZ" queue to its "jms/tmp/queue/XYZ" topic. The Diffusion client sends a topic message to the topic "jms/tmp/queue/ABC" with reply topic set to "jms/tmp/queue/XYZ". The Diffusion server looks up the binding between "jms/tmp/queue/XYZ" and the "XYZ" queue on the JMS server. The Diffusion server sends a text message to the "ABC" queue on the JMS server with reply queue set to "XYZ". The JMS server sends a test message to the "ABC" queue on the JMS client with reply queue set to "XYZ". The JMS client sends a response text message to queue "XYZ" on the JMS server. The JMS server sends the text message to queue "XYZ" on the Diffusion server. The Diffusion server looks up the binding between queue "XYZ" and topic "jms/tmp/topic/XYZ". The Diffusion server sends a topic message to the "jms/tmp/topic/XYZ" topic on the Diffusion client.