[rabbitmq-discuss] STOMP - Message queue selectors for consumers?
Toby Corkindale
toby.corkindale at strategicdata.com.au
Tue Jun 7 05:20:19 BST 2011
Hi,
I'm afraid I'm something of a beginner when it comes to message queuing
systems, although I've submitted several patches to the Perl STOMP
modules in the process of using them recently, and have picked up what I
think is a bit of knowledge.
Anyway, I have a query about RabbitMQ's STOMP plugin, and haven't quite
been able to understand the docs on the matter.
My goal is to have a queue where the consumers of that queue only
receive a subset of all messages. I want them to filter based on a
header in the messages.
Eg.
SEND
destination:/queue/foo
x-country:australia
with the receiver somehow doing something like:
SUBSCRIBE
destination:/queue/foo?x-country=australia
Now currently I can achieve this goal by creating lots of queues, one
for each possible value, and then the consumers can subscribe to all the
queues.. but this is a bit messy.
Eg.
SEND
destination:/queue/foo.australia
SUBSCRIBE
destination:/queue/foo.australia
There are some discussions of routing keys in the STOMP plugin's docs,
but I don't understand how they relate. Are they what I'm looking for?
I only want this to work with simple queues, not, as far as I know,
exchanges. Maybe I'm barking up the wrong tree though?
I note that in ActiveMQ's STOMP plugin, you can apply a selector to the
subscription like this:
SUBSCRIBE
destination:/queue/foo
activemq.selector:country="australia"
Thanks,
Toby
More information about the rabbitmq-discuss
mailing list