Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

SelectorChat Application

What the sample shows

While specific queues and topics provide focused content nodes for messages that are of interest to an application, there are circumstances where the application developer might want to qualify the scope of interest a consumer has in messages using a syntax similar to an SQL WHERE clause.

In the SelectorChat samples, each of the SelectorChat samples publishes to the jms.samples.chat topic with messages that have a property set to a different value, and then sets the subscriber to select only messages set to the appropriate property value.

Running the sample

To run the SelectorChatting samples do the following:

  1. In window 1, enter ant filterchat1.

  2. In window 2, enter ant filterchat2.

  3. In window 3, enter ant chat1.

  4. In the SelectiveChatter_1 window, enter some text and then press Enter.

    The message is displayed in that window and the Chatter_1 window.

  5. In the SelectiveChatter_2 window, enter some text and then press Enter.

    The message is displayed in that window and the Chatter_1 window.

  6. In the Chatter_1 window, enter some text and then press Enter.

    The message is displayed only in that window.

Stopping the sample

To stop all the applications, press Ctrl+C in each of the windows.

Comments powered by Disqus