[rabbitmq-discuss] How a basic cusumer of WAN know the internet connection is break?

Tim Watson watson.timothy at gmail.com
Sun Aug 5 10:37:59 BST 2012

On 4 Aug 2012, at 20:37, luo roger <roger.maillist at gmail.com> wrote:

> I am using pika lib.
> When I creat basic cusumer using a callback function, the broker push
> messsages to the client,.
> client connect to the broker throught internent, but the WAN is unstable.
> when the WAN is break, new message can't be pushed to client,but client
> think everything is ok just no new message. Then my app REST here.
> If client use baisc get in loop, it pull message from broker, when the
> connection is break,   exception of AMQPConnectionError be caused.
> The client can know internet is error.
> How a basic cusumer of WAN know the connection is break?

First of all, you should look to enable AMQP heartbeats on the channel, which will detect a broken connection quicker than waiting for the underlying tcp/ip layers to figure out what's going on.



> Roger
> _______________________________________________
> 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