[rabbitmq-discuss] Mirrored Queues in master and slaves
simon at rabbitmq.com
Thu Jan 16 11:11:51 GMT 2014
Please keep rabbitmq-discuss on CC, that way everyone can see the answers.
On 15/01/14 18:14, Alex L wrote:
> So when the master enqueues it, the message will go to a slave.
> Is there a way in Python's pika package (the same one used in the
> tutorials) to find out which particular slave node I'm currently using
> for that message?
When the master enqueues a message it will get routed to all slaves as
well. When you consume, you consume from the master and the master then
tells slaves to drop messages that have been consumed.
So you're not really "using" a slave node at any point.
What problem are you trying to solve here?
> On Tue, Jan 14, 2014 at 11:50 PM, Simon MacMullen <simon at rabbitmq.com
> <mailto:simon at rabbitmq.com>> wrote:
> On 15/01/2014 00:56, Alex L wrote:
> But when I publish a message, how would I know if I'm using the
> queue, or specifically one of the slave's queues?
> On a conceptual level, the message will always be routed to the
> master. On a practical level it will also go to all of the slaves
> (in case the master fails before seeing it) but the master will be
> the one in charge of enqueuing it.
> Is there a way to find which queue I'm using?
> It's best to view the queue as one distributed object, but if you
> need to find out the current master you can use rabbitmqctl or the
> management API.
> And would it be possible to send a message directly to a slave
> having it go through it's master?
> Cheers, Simon
More information about the rabbitmq-discuss