[rabbitmq-discuss] Consumers may hang after network instability

Alexey gmlexx at gmail.com
Mon Feb 20 13:05:55 GMT 2012


Thanks, Simone.
I've tried this solution and stuck with bug 24650.
Hope it will be fixed in next release.

On 17 фев, 22:08, "Busoli, Simone" <Simone.Bus... at ferrari.com> wrote:
> Alexey, you need to enable heartbeats to make sure that you detect network issues. It's an option on the ConnectionFactory class.
>
>
>
>
>
>
>
> -----Original Message-----
> From: rabbitmq-discuss-boun... at lists.rabbitmq.com [mailto:rabbitmq-discuss-boun... at lists.rabbitmq.com] On Behalf Of Alexey
> Sent: venerdì 17 febbraio 2012 11:22
> To: rabbitmq-disc... at lists.rabbitmq.com
> Subject: [rabbitmq-discuss] Consumers may hang after network instability
>
> Hello,
>
> We are using 2.7.1 version of .NET client and 2.7.1 rabbitmq-server.
> Several times we catched all consumers of rabbitmq server was hang after network instability (lost and reestablished connection or server with rabbitmq power cable unpluged)
>
> Problem method is IModel.Close() or IConnection.Close() (sorry, I don't remember which is)
>
> Parts of our code responded for connection below:
>
> public void Connect()
> {
>         var cf = new ConnectionFactory
>         {
>                 HostName = replica.EndPoint.Address.ToString(),
>                 Port = replica.EndPoint.Port,
>                 UserName = mqUsername,
>                 Password = mqPassword,
>         };
>         connection = cf.CreateConnection();
>         Model = connection.CreateModel();
>         Model.DeclareQueue(queueName);
>         Model.BasicConsume(queueName, false, thisConsumerTag, true, false, null, this); }
>
> public void Disconnect(){
>         if (Model != null && Model.IsOpen) Model.Close(200, "Close on client initiative");
>         if (connection != null && connection.IsOpen) connection.Close(200, "Close on client initiative", disconnectTimeout); }
>
> Can anyone suggest a right way to close connection without chance to hang?
> Would appreciate for help.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> ___________________________________________________________________________ ______________________________________
> Questo messaggio è da intendersi esclusivamente ad uso del destinatario e può contenere informazioni che sono di natura privilegiata, confidenziale
> o non divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non è il destinatario designato, o il dipendente/agente responsabile
> per la consegna del messaggio al destinatario designato, si informa che ogni disseminazione, distribuzione o copiatura di questa comunicazione è
> strettamente proibita anche ai sensi del decreto legislativo 196/03 . Se avete ricevuto questo messaggio per errore, vi preghiamo di notificarcelo
> immediatamente a mezzo e-mail di risposta e successivamente di procedere alla cancellazione di questa e-mail e relativi allegati dal vostro sistema.
> ___________________________________________________________________________ ______________________________________
> This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the
> message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from
> your system.
> ___________________________________________________________________________ ______________________________________
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list