Android MQTT Service - QoS 1 & Clean Session false strange behavior & reconnect behavior [message #1707103] |
Wed, 02 September 2015 10:59 |
Alexander Pampala Messages: 3 Registered: September 2015 |
Junior Member |
|
|
Hello. I have a running paho android mqtt service.. everything works great except one thing.
1) service is running & mobile network is enabled ... subscribed on topic with qos 1
2) server publish message "blabla1"
3) client get message "blabla1"
4) server publish message "blabla2"
5) client get message "blabla2"
6) client disabled mobile network
7) server publish message "offline blabla"
client enabled mobile network
9) client get message "blabla1" and "offline blabla"
client after restarting mobile network always get first message
can someone help?
i tried 1.0.2 version and last snapshot too.. without success
// EDIT
I looks like first message never send PUBACK to server
// EDIT 2
Another strange behavior. Service reconnects only when network state changed. I restarted mqtt server and service doesn't reconnect.. only after i disabled and enabled mobile network.
[Updated on: Wed, 02 September 2015 13:18] Report message to a moderator
|
|
|
|
Re: Android MQTT Service - QoS 1 & Clean Session false strange behavior & reconnect behavior [message #1707134 is a reply to message #1707131] |
Wed, 02 September 2015 13:47 |
Alexander Pampala Messages: 3 Registered: September 2015 |
Junior Member |
|
|
I sent first message with retain : false... i tried same server configuration with javascript on web browser and it works. Could you give me example how to implement this reconnect mechanism which depend on lost connection and not on network state? I tried something like
MqttCallback -> connectionLost -> repeat mqtt.connect()
but it looks for me like inappropriate solution.. it should be implemented somewhere in mqtt service core like network state reconnect mechanism is implemented in core.. not in MqttAndroidClient interface
Thanks for replies
[Updated on: Wed, 02 September 2015 13:53] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03190 seconds