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.

Message Consumers stop after RabbitMq restart

See original GitHub issue

Is this a bug report?

Yes

Can you also reproduce the problem with the latest version?

Yes, MassTransit 5.2.3.

Environment

  1. Operating system: Windows 10 Pro
  2. Visual Studio version: 2017
  3. Dotnet version: Core 2, Net Framework 4.7.1.
  4. Language version: C# 7.1 or higher
  5. RabbitMq version: 3.7.3

Steps to Reproduce

See repository on https://github.com/jlandheer/MassTransitReconnectTest

Basically create a client with a static async Task Main(string[] args) startup method and start the receiving bus with await bus.StartAsync();. Stop the RabbitMq service and start it again. The receiver will not receive messages after restart.

When using the synchronous version there is no problem.

Expected Behavior

Client should continue to receive messages after service restart.

Actual Behavior

Client stops receiving messages after service restart.

Reproducible Demo

See repository on https://github.com/jlandheer/MassTransitReconnectTest

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jlandheercommented, Feb 12, 2019

Wow, good catch. Changed it to await Task.Run(() => Console.ReadKey());, and as the French say: voilà!

0reactions
srollinetcommented, Feb 20, 2019

I had the same problem. Thanks for the tip, I wouldn’t have found the solution without you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rabbitmq requeue all the message after restarted
If the messages are still available on queue after stopping the consumer , then there must be some issue on the consumer code....
Read more >
Consumer doesn't consume messages after RabbitMQ restart
Consumer always reconnects to queue. Actual Behavior. Consumer doesn't reconnect to queue. At channel section in RabbitMQ management message: ".
Read more >
Why are messages lost when I restart a RabbitMQ broker
You have several messages in queue and for some reason you need to restart the broker. Once the broker was restarted your messages...
Read more >
Consumers
When a new consumer is added, assuming there are already messages ready in the queue, deliveries will start immediately. The target queue can...
Read more >
RabbitMq Client stops consuming messages - Rabbit MQ
The issue we face is that not all messages that are pushed to the message queue are consumed. After a random amount of...
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