Assigning certain classes of payload to specific queues in rabbit

0 views
Skip to first unread message

jasonjackson

unread,
Feb 17, 2010, 4:54:55 AM2/17/10
to Nanite
I am working on figuring out how this priority is best designed in the
mapper. Basically my question is that in my mapper i want to have a
priority where a payload of a higher importance would be sent to a
queue only for priority messages. there would then be a separate
agents which are only pulling from those priority queues. would the
best way to do that be to just have the priority messages in their own
vhost? or is there a way that i can have something like a :selector
option on the mapper that would assign that payload only to a specific
queue in rabbit? what is the best approach on that?

I'm basically just wanting to have things so that priority messages
aren't held up waiting for the rest of a payload to clear. Not sure
on the best approach,

Thanks,

jasonjackson

unread,
Feb 17, 2010, 5:29:46 AM2/17/10
to Nanite
Ugh.. Low on coffee..

Solution is the :target option on the Nanite.push. This is in place
of the :selector option.

Example:

Nanite.push("/injection/priority", Marshal.dump(payload), :target =>
'nanite-priority')

This will have the mapper assign this payload to the nanite-priority
queue in rabbitmq.

Reply all
Reply to author
Forward
0 new messages