On 06/06/2014 02:17 PM, Fraser Adams wrote:
Gordon,
Re "However, I am not sure whether the selector can select on the
subject/routing-key"

The spout and drain examples I posted earlier actually do work (using
qpidd, I've not tried it with the Java Broker to be fair), but those
were examples using AMQP 0.10
e.g.

./drain -b localhost -f \
"queue1; {create: receiver, link: {name: test-link, selector:
\"qpid.subject='tim'\"}}"

as you can see this is specifying a selector testing the qpid.subject
property equals tim, which in AMQP 0.10 gets set automagically when I do

./spout -b localhost --content "Hello World" "queue1/tim"


Because the subject (in AMQP 0.10) actually gets automagically mapped to
qpid.subject (essentially an application property) this all does
actually hang together with AMQP 0.10 using qpidd and qpid::messaging
without "any handling of that as a special value"

Right, my point was your are matching against the qpid.subject application property which is populated automatically by qpid messaging clients (but wouldn't necessarily be for others, not sure what the 0-10 JMS client does for example).

With AMQP 1.0 subject is an "immutable property" not an "application
property" so uses its own accessor (you of course know this better than
most :-)) so would need some code in the selector implementation to
explicitly expose it for matching.

Right, and at present that isn't there as far as I can tell (though I may just be missing it).

You might well be right that the JavaBroker would reject this as invalid
as a selector, I've been bitten by my use of hyphens in property names
being rejected, but the qpid.subject definitely worked for me the last
time I tried it on qpidd.

Ah yes, it was hyphens you had mentioned. I suspect the '.' may also be a problem, since its not a valid char in a java identifier.

Although not part of the JMS selector specification I do actually think
that being able to use the subject as a pseudo-property for message
selectors is pretty useful and something that I suspect most people
might "intuitively" expect to be able to do.

I very much agree.

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

Reply via email to