|Re: [paho-dev] Unusable token with aynchronous library (MQTTAsync) ?|
in all the current Paho clients, you can only publish a message when the client is connected. I wrote a recent message to this mailing list explaining why:
"One thing that is quite frequently asked about the Paho MQTT clients is why can't the application publish messages when not connected to a broker. This seems like an obvious thing to be able to do.
I think the main reason, is that that is the way we have developed MQTT clients for as far back as I remember. But that ability does raise other questions for the API implementation, such as:
- how to manage the stored messages (what if the connection information is wrong and no messages ever get sent, limiting the storage used, etc)
- how frequently and when to attempt reconnection to the broker
so we have avoided the problem by letting the application handle it."
It's a suggested improvement for the APIs, maybe for the next release.
On 18/07/14 08:58, Nicolas GAUTHIER wrote:
Back to the top