[rabbitmq-discuss] .NET Client - IModel.Close completes but the model is never actually shut down.

Emile Joubert emile at rabbitmq.com
Tue Sep 20 11:14:49 BST 2011


Hi Eugene,

On 19/09/11 18:44, Eugene Kirpichov wrote:
> I have a piece of code that consumes a queue.
> 
> Then the following happens:
> * A message arrives to the consumer (HandleBasicDeliver)
> * At the same time (up to fractions of a millisecond) I'm doing
> IModel.Close() on this model, which completes ok.

Are you closing the model from inside HandleBasicDeliver() ?
Can you provide a minimal piece of code that triggers the problem?
Can you reproduce this problem reliably, or does it fail only a fraction
of the time?

> * I open another channel on this connection, which works fine.
> * That one consumer never gets a HandleModelShutdown() or OnCancel()
> event, and in fact the consumer remains visible in the management
> interface for many hours after these events, holding the
> unacknowledged message.
> 
> I'm using RabbitMQ 2.6.1 and the .NET client 2.6.0.0.
> 
> What can I do to diagnose this?

Establishing the connection through the Tracer
(http://www.rabbitmq.com/examples.html#tracer) or using a network
analyser like Wireshark can help to diagnose protocol problems, but as a
library user you shouldn't need to do this.

> Can this be a bug in the .NET client, or am I misusing it?
> I have a RabbitMQ log, I have a memory dump of my .NET client process.

I don't expect the logfiles to be much help, because they don't record
consumers subscribing to queues. If there are any entries around the
relevant time then please send them.



-Emile




More information about the rabbitmq-discuss mailing list