[rabbitmq-discuss] MQTT plugin, QoS 1, Android, not consuming on reconnect

Michael Klishin mklishin at gopivotal.com
Fri Jul 25 21:22:57 BST 2014


On 26 July 2014 at 00:18:32, Bryan Cliffe (bcliffe at gmail.com) wrote:
> > I'm disconnecting from wifi and reconnecting through cellular 
> to test the robustness of the connection when the I.P changes. 
> I wanted to see how the paho java client would handle message delivery 
> on QoS 1 to Android. I'm then filling the queue during the handover 
> phase and I can't consume on reconnect. I'm using two different 
> values for the heartbeat which is 240000ms and 30000ms but I'm 
> having the same problem with both. It would be interesting if 
> it's not detecting the change over from wifi to cellular.

I'm not familiar with how exactly switching from WiFi to cellular data affects
TCP connections on Android but in general, this is exactly the kind of issue
heartbeats in MQTT are for.

Try using a value of 5-10 seconds. I'm all for improving RabbitMQ MQTT plugin
for this case but if Rabbit doesn't get a notification from the OS that the peer
disconnected, a low heartbeat interval is the only possible solution.

Staff Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list