Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Paho Java Client Exceptions

After using MQTT.js on the node.js platform I though it would be simple to use MQTT with Java, on Android, using the Paho Java client. I was wrong.

I've worked through most of my issues but there is one that bothers me. My understanding is that when you retain messages and publish, the client will figure out when to send. So if the connection is down, the developer of the client keeps publishing and when the connection is restored, the client goes ahead and publishes the messages. 

Using mqtt.js on node, I've testing this connection up, pub, received, connection down, pub, nothing, pub again, nothing, connection up, received both messages.

So when I tried a similar approach with the Paho Java client, I remove the connection, publish, and bam, I get an exception. Not only that, it also appears that the message is not retained in this code path. This forces the client user to self retain that message.

Is this intentional? A bug? Is there a different API that I should be using that I'm missing?

Any opinions, help, or criticisms would be greatly appreciated.

Thanks!
Dave

Back to the top