aio-pika
aio-pika copied to clipboard
connection pool with cluster
I'm connecting to an HA RabbitMQ cluster.
My understanding is that a RabbitMQ cluster has a single master node with the remaining as slaves. Communication to a slave gets forwarded to the master and back to the slave and onto the client.
I would like to connect to the cluster with the ip addresses of all the nodes, route traffic through the primary, and be redirected to the new primary in event of failure.
Can this be achieved?
I can see code for heartbeats, so I'm guessing I can get informed if a node becomes unresponsive. When I connect, is there an indication of whether a node is the master or a slave? Are there callbacks for the change of role?
Thanks,
Rob
see #104