[rabbitmq-discuss] persistent connections on rabbitmq-server when android client losses internet connection
jurenovic at gmail.com
Sat May 11 13:08:20 BST 2013
I have a question about about connections to server from java client. I'm
developing a Android application using rabbitmq-java-client library. I
followed the tutorials on the rabbitmq website, so I created a
ConnectionFactory with my own ip address (without any timeout or
heartbeat), then called newConnection(). Everything works fine, sending and
The problem arrises when I turn off network connection on an android
device, the connection on rabbitmq-server is still there (for long time).
If I want to achieve that the server clear my connection I have to use
heartbeat. I also tried to create new *ConnectionFactory* class and
override *configureSocket* and call socket.setKeepAlive(true). That neither
My colleague is developing an iOS application, and another one is
developing an erlang client. They don't have this problem, if they kill the
app or turn of network connection, the connections on rabbitmq-server are
cleared immediately (2-4s). *They are not using any timeouts or heartbeats*.
And just another thing, on RabbitMQ Management webpage, under connections
tab I noticed that my java client has a timeout value of 600s (when not
setting heartbeat), when C-client or Erlang client doesn't have any value
(blank) under timeout column.
Hope anyone can help me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss