[rabbitmq-discuss] .Net RabbitMQ.Client Issue: Deadlock on ConnectionShutdown
emile at rabbitmq.com
Tue Aug 21 15:38:44 BST 2012
On 21/08/12 15:10, Derek Greer wrote:
> My apologizes, I should have included the version number. I see this
> behavior using version 2.8.4 from NuGet. Perhaps you're testing with a
> different version?
I tested with the latest version, but there have been no changes in that
area since 2.8.4.
> That aside, there should never be a case when a client of the
> .Net rabbitmq client should be able to call .Close() and cause the API
> to block indefinitely.
I'm not able to reproduce the deadlock, as I said, I see an exception
> I appreciate your pointing me to the use of the IModel.ModelShutdown. I
> would have thought that event would be raised any time the model was
> closed rather than being raised exclusively due to a connection
> shutdown. I'll use that if I have to, but wouldn't you agree that
> clients of the API should be able to subscribe to the
> IConnection.ConnectionShutdown event to be alerted to connection
Yes, ModelShutdown is raised when the channel shuts down for any reason,
including due to a network interruption. Clients that need notification
of the network connection shutting down should subscribe to
ConnectionShutdown, as your example illustrates. The library also
includes an example (RabbitMQ.Client.Examples.ExceptionTest) that shows
how to go about this.
What is the problem you are trying to solve that the alleged deadlock is
preventing you from solving? If the problem is to ensure that channels
are closed when connections shut down, then you don't need to do that,
since the library already takes care of it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the rabbitmq-discuss