question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MQTT Adapter: Handling of unsupported QoS levels during subscription to control endpoint by devices

See original GitHub issue

Hono Mqtt documentation states that Currently the MQTT adapter only supports publishing of command messages using QoS 0. and discards malformed messages that e.g. are published to an unsupported topic or use an unsupported QoS value.

When devices subscribe to control endpoint with QoS levels 1 and 2 (as shown in below example), there are no error messages, successfully getting subscribed and also these devices receive commands. On the other hand, validation of QoS is done when command response is being sent.

Example (With QoS 1): $ mosquitto_sub -v -h 192.168.99.100 -u ‘sensor1@DEFAULT_TENANT’ -q 1 -P hono-secret -t control/+/+/req/#

control///req/101053c7df95-213d-4b95-91af-4b803330542c/test-qos-1 test qos 1

Example (With QoS 2): $ mosquitto_sub -v -h 192.168.99.100 -u ‘sensor1@DEFAULT_TENANT’ -q 2 -P hono-secret -t control/+/+/req/#

control///req/1010d8016fad-48f0-4027-8fac-dcfcb2d3e13a/test-qos-2 test qos 2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
sophokles73commented, Oct 17, 2018

So your point is that we should deny a request to subscribe using QoS 2, right? I can live with that. Would you mind creating a PR?

1reaction
kaniyancommented, Oct 17, 2018

IMHO it is also important how consistently a system behaves in case of invalid inputs, which attributes to user friendliness. In case of command & control, a device can subscribe successfully with QoS 2 (system works fine) and the same device face issues when try to send a response to those command with QoS 2.

IMHO it is consistent, if hono doesn’t let devices successfully subscribe with QoS 2 to a control endpoint. It is also ok, that we (even) more explicitly update the user guide.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MQTT adapter - Bosch IoT Device Management
The MQTT adapter supports publishing of telemetry data by means of MQTT PUBLISH packets using QoS 0 or QoS 1. The devices can...
Read more >
MQTT Adapter :: Eclipse Hono™
The MQTT adapter supports the publishing of telemetry data by means of MQTT PUBLISH packets using either QoS 0 or QoS 1. Using...
Read more >
Device integration using MQTT - Cumulocity IoT Guides
Processing modes: Control whether data is persisted in Cumulocity IoT database, ... The Cumulocity IoT implementation supports all 3 levels of MQTT QoS:....
Read more >
MQTT - AWS IoT Core - AWS Documentation
Persistent sessions store a client's subscriptions and messages, with a quality of service (QoS) of 1, that have not been acknowledged by the...
Read more >
What QoS levels does the MQTT adapter support, and why?
In MQTT, the way QoS 1 works is that every message is individually ack'd. So the receiving end (the client, for subscribe-side messages)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found