Skip to content

Commit a413f29

Browse files
committed
docs: pipeline: inputs: mqtt: clarify control packet handling
- Split the control packet sentence so the SUBACK and UNSUBACK replies read unambiguously - Note that a QoS 2 PUBLISH retransmitted on the same connection before its PUBREL is acknowledged again but not ingested twice - Note that a malformed PUBREL, SUBSCRIBE, or UNSUBSCRIBE packet closes the connection - State only the malformed packets the plugin detects: invalid fixed header flags or a truncated or missing payload. SUBSCRIBE requested QoS values aren't validated, so "malformed" overclaimed - PUBREL has no payload, so describe its checks as a missing, truncated, or oversized packet identifier - Describe the missing or truncated topic filter list separately for SUBSCRIBE and UNSUBSCRIBE Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent 1f4038f commit a413f29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pipeline/inputs/mqtt.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The plugin supports the following configuration parameters:
2323
- Defaults for `listen` and `port` are `0.0.0.0` and `1883`, so you can omit them if you want the standard MQTT listener.
2424
- Payloads are expected to be JSON maps; non-JSON payloads will fail to parse.
2525
- In v5.1.3 or later, the plugin closes the connection when it receives a `PUBLISH` packet with an invalid QoS level (`3`), or when it can't write a reply to the client.
26-
- The plugin only receives published messages. It completes the QoS 2 handshake (`PUBREL` is answered with `PUBCOMP`), answers `SUBSCRIBE` with a `SUBACK` that refuses every topic filter and `UNSUBSCRIBE` with an `UNSUBACK`, and closes the connection if a client sends a second `CONNECT`. It doesn't keep session state, so `CONNACK` always reports no session present.
26+
- The plugin only receives published messages. It completes the QoS 2 handshake by answering `PUBREL` with `PUBCOMP`. If a client retransmits a QoS 2 `PUBLISH` on the same connection before sending its `PUBREL`, the plugin acknowledges it again but doesn't ingest it twice. It answers `SUBSCRIBE` with a `SUBACK` that refuses every topic filter, and answers `UNSUBSCRIBE` with an `UNSUBACK`. It closes the connection if a client sends a second `CONNECT`, or a `PUBREL`, `SUBSCRIBE`, or `UNSUBSCRIBE` packet with invalid fixed header flags or a missing or truncated packet identifier. It also closes the connection for a `PUBREL` with extra bytes after its packet identifier, and for a `SUBSCRIBE` or `UNSUBSCRIBE` packet whose list of topic filters is missing or truncated. It doesn't keep session state, so `CONNACK` always reports no session present.
2727
{% endhint %}
2828

2929
### TLS / SSL

0 commit comments

Comments
 (0)