[rabbitmq-discuss] Fault-tolerant subscriptions using the .NET client
oj at buffered.io
Fri Apr 1 04:09:51 BST 2011
I see the issue now. My code looks like this:
var eventArgs = default(BasicDeliverEventArgs);
if (!_queueSubscripion.Next(500, out eventArgs))
eventArgs = null;
I wasn't aware that in the case where the connection has been dropped that
the Next() call would return true but eventArgs would be null. That's my
mistake. I will make the chances now to utilise this behaviour.
Thanks again for taking the time to look into the issue. I appreciate it.
On 30 March 2011 00:02, Emile Joubert <emile at rabbitmq.com> wrote:
> Hi OJ,
> On 25/03/11 20:35, OJ Reeves wrote:
> I am surprised to hear that the Dispose() method is called when the
>> connection is broken yet subsequent calls to subscription.Next()
>> continue to function and return 'true'. This seems a little
>> counter-intuitive to me. I would expect that attempting to called Next()
>> on a subscription that has been disposed would result in some kind of
> That's not what I see. As soon as a connection error occurs, the
> subscription is disposed and calls to Next() return null. Perhaps Dispose()
> is not getting called in your case. One possible reason for that is an
> incorrectly trapped exception.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss