Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

Request and Reply (Pub/Sub)

What the sample does

In this example in the Pub/Sub domain, the replier application must be started before sending messages from the requestor so that the Pub/Sub replier's message listener can receive the message and release the blocked requestor.

Running the sample

To run the Pub/Sub Request and Reply sample do the following:

  1. In window 1, enter ant trequest.

  2. In window 2, enter ant treply.

  3. In the Requestor window, type AaBbCc then press Enter.

    The Replier window reflects the activity, displaying:

    [Request] RequestingChatter:
                                AaBbCc

    The replier completes its operation (converts text to uppercase) and sends the result in a message to the requestor. The requestor gets the reply from the replier:

    [Reply] Transformed RequestingChatter: AaBbCc to all uppercase: REQUESTINGCHATTER: AABBCC

Stopping the sample

To stop the applications press Ctrl+C in each window.

Comments powered by Disqus