Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Difference in implementation : Java / .NET (subscribtion/messageArrived)

Being new to MQTT and wondering to utilize it in an upcoming project : but is it a bug or feature that "Paho Java" and "Paho .NET" (m2mqtt) seems to differ in how a subscriber should work.

Java allows you to throw an Exception in messageArrived:

http://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttCallback.html#messageArrived%28java.lang.String,%20org.eclipse.paho.client.mqttv3.MqttMessage%29

from javadoc: "An acknowledgment is not sent back to the server until this method returns cleanly."

...but ".Paho NET" does not seem to work the same way. An acknowledgment has already been sent to the broker when the message is "delivered" to the subscriber.

https://m2mqtt.wordpress.com/using-mqttclient/

No exceptions can be thrown in subscribing app. I like the Java-version better - it gives the subscribing app more control.

Should "Paho .NET" be fixed? Or have I misunderstood something?

Thanks for the great work.

Back to the top