Consumer not re-subscribing when node with queue goes down
See original GitHub issueEasyNetQ version 5.2.1
Hi, I’ve encountered a problem where EasyNetQ consumers are not re-subscribing to queues if the broker node goes down & comes back up. I’m running a RabbitMQ cluster with 3 nodes inside Kubernetes.
The consumer is connected to Node A, with the queue existing on Node B. If Node B restarts then the subscription is lost; EasyNetQ reports this in logs: Consumer with consumerTag 63c00abb-b8c7-4682-b0f8-501279a59d7e has cancelled
. However, when Node B comes back online, the consumer doesn’t re-subscribe, and so doesn’t consume any more messages.
If Node A goes down instead, then I can hook into the Disconnected/Connected events and handle things accordingly. There doesn’t seem to be an equivalent Cancelled event, so I’m not able to act on the lost subscription.
I’ve read the docs thoroughly and I’m creating the connection & subscription exactly as described (using RespondAsync
, and calling WithQueueName
). Is EasyNetQ able to handle this failure mode automatically?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Awesome. Thanks
@Pliner I’ve just updated the Cluster Support wiki page, how does this look to you https://github.com/EasyNetQ/EasyNetQ/wiki/Cluster-Support/_compare/01d2aad0f5059bff4654de322f2b6681e1dfe962...5068985a4df688ee36fccccbae2fe8c689efe317