[rabbitmq-discuss] "Load balancing" queue creation
tim at rabbitmq.com
Fri Jan 11 10:59:28 GMT 2013
On 01/10/2013 01:24 PM, Adam Rabung wrote:
> After reading this
> and this
> I understand that connecting to random nodes of a cluster does not
> really help spread the processing cost across all of the nodes -
> processing happens in the master (and slaves), regardless of what node
> I connect to.
> Does this suggest that I should take great care of what node I connect
> to when _creating_ a queue? If I use
> ConnectionFactory.newConnection(Address) with the same array each
> time, won't a majority of queues be created on the first node of that
> array, creating a load balance problem? This scenario assumes we
> mirror only to a subset of nodes.
No that's not the case. RabbitMQ clusters replicate *all* entities
across *all* nodes (in the cluster), so it doesn't matter where you
_create_ the queue/exchange. Mirroring is somewhat orthogonal to
clustering, in that if you create a queue Foo then it will exist on all
the nodes anyway, but only if you mirror the queues across some nodes
will messages arriving at the said queue on one particular node get
replicated to the same queue on the other (mirrored) nodes.
> Thank you,
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss