[rabbitmq-discuss] RabbitMQ consumer rebind in .net

Arindam Nayak nayak.arindam at gmail.com
Fri Aug 30 12:19:15 BST 2013


I have uploaded sample code for this. Link is - http://j.mp/rbconsumer.  

How to reproduce this --

Run the program , put break points on  (Consumer.cs)
1. RestartConsumer() function start point,
2. while (isConsuming) {
3. catch (Exception exp)

I have not written producer for this, when i run this, i put something in 
queue(i.e. producer kind) from management UI.

So , when running the program it will 1st hit (#2 while (isConsuming)), and 
then introduce an exception (may be restart rabbitmq server or something 
else),
then it will hit "#3catch(Exception exp)", this will subsequently call 
restart code, you can check how, main application exits while executing 
restart code.


On Thursday, 29 August 2013 17:28:35 UTC+5:30, Arindam Nayak wrote:
>
> I have uploaded screencast for this - link  - 
> http://screencast.com/t/NG75rMlwOlH1
>
> On Thursday, 29 August 2013 12:48:20 UTC+5:30, Наиль Салихов wrote:
>>
>> Did you get any exception when trying recreate connection?
>> Where you lost connection - in consumer or producer? Can you provide your 
>> code? 
>> Without more detail information nobody can helps you.
>>
>> среда, 28 августа 2013 г., 15:15:11 UTC+4 пользователь Arindam Nayak 
>> написал:
>>>
>>> I have written a rabbitmq consumer service, which is a windows service, 
>>> it constantly polls (something like while(true)) and reads queue data and 
>>> process, it works fine for 4-5 days, but suddenly after that it gets 
>>> detached from queue and stalls windows service until i manually restarts 
>>> that windows service. I have using .net client libraries. I have also added 
>>> restart code. that re creates connection , binds to queue and then listens 
>>> , but that restart code does not work. When i tried to debug the service, 
>>> it does not help, it stops debug process abruptly , at connection 
>>> re-creation time. Please help.
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130830/5230f1d0/attachment.htm>


More information about the rabbitmq-discuss mailing list