MQTT Adapter: Close device connection when a telemetry/event message cannot be processed.
See original GitHub issueA device publishes an event/telemetry message with QoS 1. The MQTT adapter after successfully establishing the device connection, realizes that the message cannot be processed e.g no credit available, the message limit is exceeded etc. In this case the device remains connected and keeps waiting for the PUBACK
packet from the Hono.
Similar scenario is when a device publishes a telemtry/event message with QoS 2 (not supported by Hono). In this case, the device remain connected and it keep waiting for the PUBREC
packet.
MQTT 3.1.1 spec (MQTT-3.3.5-2) specifies that there is no way to inform the MQTT client that the publish action is not accepted. The server must either make a positive acknowledgement or close the Network Connection.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
MQTT Adapter: Close device connection when a telemetry ...
The MQTT adapter after successfully establishing the device connection, realizes that the message cannot be processed e.g no credit available, ...
Read more >MQTT Adapter :: Eclipse Hono™ Vers.: 1.2
The MQTT adapter by default requires clients (devices or gateway components) to ... message cannot be processed, the connection to the client is...
Read more >MQTT adapter - Bosch IoT Device Management
The MQTT protocol adapter exposes an MQTT topic hierarchy for publishing messages and events to the Telemetry and Event endpoints of the device...
Read more >Publishing over the MQTT bridge - Cloud IoT Core
After the device is configured with an MQTT client and connected to the MQTT bridge, it can publish a telemetry event by issuing...
Read more >MQTT - AWS IoT Core - AWS Documentation
Use the AWS IoT MQTT messaging protocol for your devices. ... the client a DISCONNECT to notify connection closure with a reason code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At first I didn’t think that this is actually mandated by the spec but in 4.8 this seems to be actually stated as a requirment:
So it seems that closing the connection on any problems we encounter processing an incoming message, actually seems to be what the spec expects us to do. In order to keep things simple I would then propose to not make this configurable (yet). If at a later time we find this helpful, we can still add it.
@kaniyan @calohmn @dejanb @ctron WDYT?
@sophokles73 👍