[rabbitmq-discuss] Network failures recovery with RabbitMQ Javaclient

Busoli, Simone Simone.Busoli at ferrari.com
Fri Dec 9 14:50:10 GMT 2011


Hi Michael, I've been working on something similar on a .NET library, and currently what I've been doing is twofold on the publishing and consuming sides.
In either case I subscribe to connection shutdown events and reschedule connections, during this time publishes are enqueued locally and dequeued as soon as the connection comes back. With regards to threading I've found that keeping the library thread safe by enqueueing publishes into an in-memory thread-safe queue which gets emptied by a single thread (on the publisher side) and having a single thread consuming from all the rabbit queues and marshaling the received messages into the application to work quite well, but I'd be interested to know about other approaches as well.

-----Original Message-----
From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Michael Klishin
Sent: venerdì 9 dicembre 2011 15:43
To: Rabbit-Mq Discuss-Mailing List
Subject: [rabbitmq-discuss] Network failures recovery with RabbitMQ Java client

I am investigating how to implement an (opt-in) network failure recovery for Langohr [1] and Hot Bunnies [2] and curious about how people approach this problem. My main concern is handling shutdown notifications across multiple threads.

I am only trying to solve "the 80%" case for consumer apps right now. We have done it for amqp gem and it works fairly well but it is different from RabbitMQ Java client in many ways and most of apps that use it are single threaded.

So, if you have implemented network failure recovery using the Java client, I would be happy to hear what did and didn't work for you.

1. https://github.com/michaelklishin/langohr
2. https://github.com/ruby-amqp/hot_bunnies

MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://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.
_________________________________________________________________________________________________________________




More information about the rabbitmq-discuss mailing list