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.
To run the SelectorChatting samples do the following:
In window 1, enter
ant filterchat1.In window 2, enter
ant filterchat2.In window 3, enter
ant chat1.In the SelectiveChatter_1 window, enter some text and then press Enter.
The message is displayed in that window and the Chatter_1 window.
In the SelectiveChatter_2 window, enter some text and then press Enter.
The message is displayed in that window and the Chatter_1 window.
In the Chatter_1 window, enter some text and then press Enter.
The message is displayed only in that window.








