Additional JMS Features
The following sections cover some additional features available in JMS. Not all the features of JMS are covered, and you should refer to the JMS API specification for more information.
The JMS API provides support for filtering received messages. This is accomplished by using a message selector. The createConsumer() and the createDurableSubscriber() methods have variants that allow a message selector to be specified.
The message selector is a string containing an SQL-like conditional expression. Only message header values and properties can be specified in the message selector. It is not possible to filter messages based on the contents of the message body.
String highPriority = "JMSPriority = '9' AND ...