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

Michael Klishin mklishin at gopivotal.com
Fri Jul 25 20:59:11 BST 2014

 On 25 July 2014 at 23:54:35, brydev (bcliffe at gmail.com) wrote:
> > =WARNING REPORT==== 25-Jul-2014::17:08:50  
> ===
> MQTT disconnecting duplicate client id "sub1_19c6ee855806c472"  
> ("  
> ->")  
> This gets called after a disconnect, if I call mClient.setCallback(MqttService.this);  
> it forces the message queue onto the device but it only works sometimes,  
> usually only on a fresh start.

So if I understand it correctly, when a client (Paho Java) loses connection,
you get no deliveries for re-registered subscription with the same client id,
but creating a completely new connection with the same client id makes
things work some of the time?

MQTT spec requires brokers to disconnect existing clients with the same client ID
when handling CONNECT:

«If a client with the same Client ID is already connected to the server, the "older" client
must be disconnected by the server before completing the CONNECT flow of the new

So I'm curious if the issue may have something to do with lost connections not being
detected fast enough.

How do you simulate lost client connections? What [MQTT] heartbeat value do you use?

Staff Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list