[rabbitmq-discuss] long running producer
Emile Joubert
emile at rabbitmq.com
Fri May 27 09:24:09 BST 2011
Hi,
On 26/05/11 19:05, Rajarshi Chakravarty wrote:
> Hi,
>
> Can anyone post an example of a Producer program in Java that creates a
> connection to a queue and keeps it open infinitely?
>
> My requirement is to listen to a port and whenever data comes to it,
> send it to a Rabbit queue.
>
> There should be some recovery mechanism like if the connection gets
> broken, the program should attempt a reconnect.
It should be possible to construct a solution using the Java message
patterns library, which implements reconnection logic:
http://hg.rabbitmq.com/rabbitmq-java-messagepatterns/
-Emile
More information about the rabbitmq-discuss
mailing list