Best practices regarding dynamic creation and binding of queues to topic

612 views
Skip to first unread message

BenDave

unread,
Jan 7, 2015, 1:01:32 PM1/7/15
to rabbitm...@googlegroups.com
Hi,

I am wondering what are the best practices regarding the dynamic creation and binding of queues to a topic.

The intent is for a number of consumers to dynamically create queues and bind them to a topic.
This will allow each of these consumers to dynamically register for a given message; once the message is received the queue would be unbound and destroyed. In effect a queue only receives one message and is then destroyed.

This may result in the creation of a maximum of 10 queues per second.

What is the general guidelines on this ? Is this suggested approach recommended are discouraged ? Are there any performance and resource issues associated with this ?

Many thanks,
BenDave

Daniel Burke

unread,
Jan 7, 2015, 3:15:05 PM1/7/15
to rabbitm...@googlegroups.com

Every night at peak time of processing, we create and delete queues at a much much higher rate (over 1000) than that, with no ill results from it.  We use a three node cluster with a policy to mirror all queues to every node.

Dan.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Jan 7, 2015, 3:23:21 PM1/7/15
to rabbitm...@googlegroups.com, BenDave
Ben,

As Daniel's experience suggests, the rate is no big deal. Just keep in mind that as the # of bindings grows.
D ifferent exchange types' routing scales differently, e.g. fanout's worst routing time complexity is O(n) w.r.t. the number of bindings while topic exchanges are trie-based and thus scale much better.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Jan 7, 2015, 4:02:07 PM1/7/15
to rabbitm...@googlegroups.com, BenDave
On 7 January 2015 at 23:23:18, Michael Klishin (mkli...@pivotal.io) wrote:
> As Daniel's experience suggests, the rate is no big deal. Just
> keep in mind that as the # of bindings grows.
> D ifferent exchange types' routing scales differently, e.g.
> fanout's worst routing time complexity is O(n) w.r.t. the number
> of bindings while topic exchanges are trie-based and thus scale
> much better.

Someone points out that with binding churn and when all queue match, fanout exchange routing
is going to have lower latency. My point was simply to indicate that different exchanges have pretty different
routing algorithms and implementations, so YMMV. But 10 operations/second is still a low rate.
Reply all
Reply to author
Forward
0 new messages