question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consumer not re-subscribing when node with queue goes down

See original GitHub issue

EasyNetQ 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Spring amqp consumer not re-connecting to queue after ...
We have a spring application which is having a dynamic queue listener connecting to queue in rabbitmq. Let's say I have a total...
Read more >
Some classic queues don't have consumers after node restart
Node 1 goes down, the consumers reconnect to node 2 or node 3, try to basic.consume to their respective queues, but they get...
Read more >
Reliability Guide
Consumers that were connected to a different node will be automatically re-registered by RabbitMQ when a new leader replica for the queue is...
Read more >
What are the solutions to the Distributed Queue problem?
Writing a basic queuing system is fairly simple, but as you noted above with all of the challenges, doing it right is another...
Read more >
13 Common RabbitMQ Mistakes and How to Avoid Them
Here is a list, that will help you avoid common RabbitMQ mistake! ... message is received by the queue it goes straight out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found