[ http://issues.apache.org/jira/browse/QPID-21?page=comments#action_12454302 ] Martin Ritchie commented on QPID-21: ------------------------------------
Implementation of selectors is not possible with AMQP 0.8 as there is no way to convey the selector string to the broker. Request to AMQP WG has been made to address this. > Add JMS Message Selector Capability > ----------------------------------- > > Key: QPID-21 > URL: http://issues.apache.org/jira/browse/QPID-21 > Project: Qpid > Issue Type: New Feature > Components: Java Broker, Java Client > Reporter: Marnie McCormack > Assigned To: Martin Ritchie > Fix For: M2 > > > Raised this JIRA to document a known gap (required for JMS compliance) and in > response to an end user request. This task may have implications for the AMQP > protocol and some investigation is required on this point before completing > implementation work. > Info below quoted from JMS Specification, section 3.8 (see specification for > full details of JMS selector syntax & refs used below): > A JMS message selector allows a client to specify, by message header, the > messages it's interested in. Only messages whose headers and properties match > the selector are delivered. The semantics of not delivered differ a bit > depending on the MessageConsumer being used. See Section 5.8,"QueueReceiver," > and Section 6.11, "TopicSubscriber," for more details. > Message selectors cannot reference message body values. A message selector > matches a message if the selector evaluates to true when > the message's header field and property values are substituted for their > corresponding identifiers in the selector. > This additional information from the SUN JMS guide: > A message selector is a String that contains an expression. The syntax of the > expression is based on a subset of the SQL92 conditional expression syntax. > The message selector in the example selects any message that has a NewsType > property that is set to the value 'Sports' or 'Opinion': > NewsType = 'Sports' OR NewsType = 'Opinion' > The createConsumer and createDurableSubscriber methods allow you to specify a > message selector as an argument when you create a message consumer. > The message consumer then receives only messages whose headers and properties > match the selector. (See Message Headers, and Message Properties.) A message > selector cannot select messages on the basis of the content of the message > body. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
