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.

Connection Consumer disconnected from broker because of Unexpected Exception

See original GitHub issue

Describe the bug In some rare cases I got disconnection from rabbitmq, because of an exception in RabbitMQ.Client, on this line: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/v6.4.0/projects/RabbitMQ.Client/client/impl/ModelBase.cs#L702 (note that with 6.x.x releases there was no such exceptions)

Connection Consumer disconnected from broker xxxx:5672 because of Unexpected Exception -> System.InvalidOperationException: Unsolicited delivery - see IModel.DefaultConsumer to handle this case. at RabbitMQ.Client.Impl.ModelBase.HandleBasicDeliver(String consumerTag, UInt64 deliveryTag, Boolean redelivered, String exchange, String routingKey, IBasicProperties basicProperties, ReadOnlyMemory`1 body) at RabbitMQ.Client.Framing.Impl.Model.DispatchAsynchronous(IncomingCommand& cmd) at RabbitMQ.Client.Impl.ModelBase.HandleCommand(IncomingCommand& cmd) at RabbitMQ.Client.Impl.Session.HandleFrame(InboundFrame& frame) at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration() at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()

It looks like that there is no way to set IModel.DefaultConsumer to handle that exception (or at least I cannot find it).

To Reproduce It happens rarely having multiple rabbit mq consumers.

Expected behavior Handle the exception.

Please complete the following information):

  • EasyNetQ version: [e.g. 7.0.4]
  • RabbitMQ version [e.g. 3.8.16]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
zhelewcommented, Sep 15, 2022

Thanks @Pliner, will check it, it was working as expected having RabbitMQ.Client 6.4.0 referenced in the project.

0reactions
Plinercommented, Sep 15, 2022

@zhelew https://www.nuget.org/packages/EasyNetQ/7.2.0-alpha1 It should install 6.4.0 RabbitMQ.Client.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ack-Issues after reconnect: PRECONDITION_FAILED - ...
Hello, we encounter a strange issue that happens from time to time. From the log file it looks like the connection to RabbitMq...
Read more >
Spring Boot and Kafka: Broker disconnected
Given that I am listening on an existing Kafka broker and topic, no settings can be changed there. Any changes must be on...
Read more >
consumer disconnects with no reason
In this scenario not all my messages are nacked and I see the consumer disconnects although no apparent reason. No errors in the...
Read more >
Why Can't I Connect to Kafka? | Troubleshoot Connectivity
This means that the producer and consumer fail because they'll be trying to connect to that—and localhost from the client container is itself,...
Read more >
Troubleshoot issues when connecting to your Amazon ...
The producer or consumer is unable to connect to the broker host and port. The broker string is not valid. If you get...
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