subscribing to multiple queues

0 views
Skip to first unread message

Marek

unread,
Nov 11, 2009, 8:00:28 AM11/11/09
to Orbited Discussion
Hello,
is it possible to subscribe to multiple queues from single client?

I'm using Orbited (somewhere between 0.7.9 and 0.7.10), Stomp and
RabbitMQ.

I have one queue for user and one for location on site and I'd like to
subscribe to them both. Those combinations are changing with every
request, so I'd like to avoid creating any composite queues in
RabbitMQ (if something like that is even possible).

I'll try issuing multiple stomp.subscribe() commands, but there might
be other ways I'm not aware of like specifying multiple queues in one
subscribe() call or it might not be possible at all...so external info
is welcome.

Thank you

BobDobbs

unread,
Nov 11, 2009, 8:40:37 AM11/11/09
to Orbited Discussion
Yeah... just give multiple stomp.subscribes a shot. Our app subscribes
to multiple queues and topics. No problems with it that I am aware of.

Just keep in mind that you often want to avoid subscribing multiple
end users onto a single queue. If you subscribe separate people to the
same queue... the messages will alternate between them (i.e. each will
lose half of the messages). If multiple people want to subscribe to
the same set of messages and receive 100% of them... it needs to be a
topic.

Jacob Rus

unread,
Nov 11, 2009, 11:12:11 AM11/11/09
to orbite...@googlegroups.com
Marek wrote:
> is it possible to subscribe to multiple queues from single client? [...]

>
> I have one queue for user and one for location on site and I'd like to
> subscribe to them both. [...]

> I'll try issuing multiple stomp.subscribe() commands,

Yes, this is the main purpose of a message queue: to allow clients to
pick and choose which channels they want to subscribe to, and then
receive all messages relevant to that channel. Sending multiple
subscribe commands is exactly what you want to do.

–Jacob

Reply all
Reply to author
Forward
0 new messages