Description
A RabbitMQ cluster can have multiple nodes, but rstream Producer
and Consumer
classes have host
and port
arguments in __init__
only for one node. I know that rstream support cluster dicovery and after discover rstream will produce messages to leader and will consume messages from replicas. But when I want to use rstream with cluster without load_balancer_mode I need to choose between nodes to initial client. When the application starts, the selected node may not be available but others are available and rstream will not work. Also when node available, consumer or producer started and leader node brokes after some time and rstream cannot use it default client to discover cluster and resolve a problem.
As user of rstream I want to pass list of nodes (host and port) to Consumer
and Producer
and rstream will resolve all nodes disconnection problems to stay reliable. Related issue - now consumers cannot reconnect automatically, for this you need to define a special callback on_close_handler
. It looks like in order to teach stream to work reliably with a cluster without a balancer, this problem also needs to be solved.