RabbitMQ consumer cannot connect back to cluster after one node down #1584
-
|
Hi Team, We have a production environment with 3 cluster nodes and everything is working fine when all the 3 nodes in RabbitMQ cluster. When one RabbitMQ node is down, consumer is unable to change to other 2 working RabbitMQ nodes. We have provided all 3 nodes IPAddress in our consumer and also we have set AutomaticRecoveryEnabled, NetworkRecoveryInterval to true. When everything is working normal, consumer count is shown in the admin panel for that consumer queue, but once restarted queue is still appears but consumer count is shown as zero. Can you please let us know any possible issue or approach to flow? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Questions:
|
Beta Was this translation helpful? Give feedback.
-
|
@Pramod34 please see this complete docker compose project: https://github.com/lukebakken/rabbitmq-dotnet-client-1584 Running I have tested "force close" via the Management UI, as well as stopping a node to which an application is connected, via The applications do recover, however, I did have to subscribe to the I am going to create a branch in this project to test reconnection behavior using version |
Beta Was this translation helpful? Give feedback.
-
|
@Pramod34 - please note that connection recovery is more reliable when applications are configured to use HAproxy. See this branch: https://github.com/lukebakken/rabbitmq-dotnet-client-1584/blob/haproxy/producer/Program.cs#L10-L11 |
Beta Was this translation helpful? Give feedback.
@Pramod34 please see this complete docker compose project:
https://github.com/lukebakken/rabbitmq-dotnet-client-1584
Running
make upwill bring up a RabbitMQ cluster, with a .NET consuming and producing application.I have tested "force close" via the Management UI, as well as stopping a node to which an application is connected, via
docker compose stop rmqX.The applications do recover, however, I did have to subscribe to the
ConnectionShutdown,ModelShutdownandRecoverySucceededevents to get things restored "just right". Without waiting long enough forconnection.IsOpento returntrue, sometimes recovery just didn't work right. I'm not exactly sure why at this time.I am going to crea…