[rabbitmq-discuss] Advice on where to reset connection and channel

Tobias Gutzmann Tobias.Gutzmann at ist.com
Wed Feb 19 09:35:51 GMT 2014


Hi Michael,

I wonder if you have an estimate on when connection recovery (branch bug14587) will make it into the official release. We have connection recovery implemented internally, but we'd like to switch to something official.

Regards,
Tobias

-----Ursprungligt meddelande-----
Från: rabbitmq-discuss [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] För Michael Klishin
Skickat: den 16 februari 2014 07:45
Till: Discussions about RabbitMQ
Ämne: Re: [rabbitmq-discuss] Advice on where to reset connection and channel


On 16 Feb 2014, at 09:09, cw storm <cwstorm at gmail.com> wrote:

> I don't think I would want to include the function to re-establish the connection/channel in both of the handlers.  So, where would I perform the re-connect logic.  Maybe I should just pick one.

JVM language clients that support reconnection, including RabbitMQ Java client itself on branch bug14587, have a wrapper connection that delegates everything to the underlying connection (so, implements com.rabbitmq.client.Connection) and adds a shutdown listener that performs recovery:

 * Reconnects (creates a new delegate connection)
 * Reopens all channels (there is a wrapper Channel as well), including various listeners
 * Recovers queues, exchange, bindings, and consumers (in this order)

> Also, another consumer callback name "handleCancel".  This will only be invoke when an unexpected cancellation by the broker.  That would also mean I would have to reconsume from the other node by creating another connection/channel.  I assume this does not get invoke during a restart of the broker or a force close connection.  That would only apply to the two that I mentioned, right?

Not "unexpected cancellation" but when the queue is deleted.

MK

Software Engineer, Pivotal/RabbitMQ


_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list