Closed lglenat closed 5 years ago
Good catch! I have moved this line to the struct initialization :-)
Hello, this seems not to be fixed i 2.6.2. I can change qos when placing into deprecated [backend.mqtt]
, but it does not work for [backend.mqtt.auth]
mentioned in the documentation.
Hello, this seems not to be fixed i 2.6.2. I can change qos when placing into deprecated
[backend.mqtt]
, but it does not work for[backend.mqtt.auth]
mentioned in the documentation.
Are you sure? I tested today with the latest version and qos = 1
in [backend.mqtt.auth.generic]
and it was working fine (see output logs below):
...
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
INFO[0049] mqtt: publishing message qos=1 topic=gateway/647fdxxx
...
I found that the problem only occurs when using marshaler="v2_json"
. If that's the case, root_run.go#runV2 gets called and qos is read only from the old location [backend.mqtt]
. If runV3
is activated, old and new location [backend.mqtt.auth.generic]
can be used.
This should be highlighted in the documentation or at least made consistent - current documentation uses old marshaller and new qos location.
Changing the QOS setting in the toml config file currently does not have any effect on the actual QoS used by the MQTT backend. It seems that there has been a regression a while ago during a major refactoring of the architecture.
I am not sure this is the best way of fixing the issue, but it does the job. As for testing, with this fix I was able to have the gateway bridge connected with QoS 1 to AWS IoT.