|Re: [paho-dev] Unable to confirm delivery without setting messageArrived callback|
Thank you for your reply Ian.
I was not thinking in servers sending unsolicited messages but clients only sending messages. I mean, it would be a real use case to have a device (temperature sensor for example) that only wants to publish data to the broker. In that cases it would be a waste of time/resources to have a callback for received messages since we know that the devices shouldn’t receive anything (actually it could be solved configuring an empty function as messageArrived callback, but it is estrange for me to have in my code an empty function that simply does nothing).
I don’t know if we are talking about the same use case.
Thank you so much for your time.
that was a deliberate decision on my part. If no messageArrived callback is set, then no incoming messages can be sent to the application. This would cause the library a dilemma, so I felt it a good idea to insist on a messageArrived callback being implemented.
Also, I do know that some MQTT servers can send unsolicited messages to a client.
On 09/23/2016 10:31 AM, Moran Adrian wrote:
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
Back to the top