gost / server

GOST - Go implementation of OGC SensorThings API
MIT License
61 stars 19 forks source link

More MQTT configuration options and switch to paho.mqtt.golang 1.1.1 #162

Closed janniswarnat closed 5 years ago

janniswarnat commented 5 years ago

Hi all,

we had some issues with GOST server´s Paho client disconnecting from Mosquitto MQTT broker. The client sent a ping request to Mosquitto that was immediately answered with a ping response. This response was never acknowledged by the Paho client though and the connection ended with:

MQTT client lost connection: pingresp not received, disconnecting

The same issue is discussed briefly here: https://github.com/eclipse/paho.mqtt.golang/issues/210

The problem can be solved by setting the Paho client´s "Order" option to false (if message order is irrelevant for your application). So I made this option configurable in GOST server.

During the analysis I switched to Paho´s latest released version 1.1.1 and made the client´s debug logging configurable. Maybe this is also helpful for other MQTT issues.

Please get back to me with any questions or comments.

Best regards

Jannis

bertt commented 5 years ago

thanks!