Clarification:

Over AMQP 1.0, the c++ qpid::messaging client will set a subject filter on link from the queue. The c++ broker will then treat that much like a message selector, except that it is a match against subject rather than anything more complex. On 0-10 the c++ client is like the python one, and the subject is ignored for a receiver.

On 06/06/2014 11:48 AM, Fraser Adams wrote:
On the subject (pun!!) of "If on the other hand you use an address where
the 'node' is a queue, i.e. <queue>/<key>" if that's the behaviour that
is actually required (though I'd personally use the exchange/queue
approach) I *wonder* if it could be achieved via message selectors.

You can certainly control the arguments sent in the subscription, and thus specify a selector to use.

The c++ broker does now support selectors also, however the syntax is as defined for the registered AMQP 1.0 selector-filter (you can use it over 0-10 as well however) which is like the JMS syntax, but with a different convention for naming the special fields. The java broker supports the JMS selector syntax unmodified. The key used in the argument also varies. (This is something that would not be difficult to make more uniform and simpler).

However, I am not sure whether the selector can select on the subject/routing-key. Looking at the c++ brokers code, I can't see any handling of that as a special value nor can I find anything in the JMS spec.

Now, the qpid.messaging (and qpid::messaging) clients will set a qpid.subject header on messages they send, with the value being the subject on the message (which will be the subject specified in the sender address by default). So providing the messages were sent by those APIs, you could select on qpid.subject.

However as Fraser has previously pointed out that is not a valid JMS name, so it may be rejected by the java broker(?) as invalid within a selector.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to