Skip to content

Commit eb4d867

Browse files
authored
pipeline: inputs: mqtt: update mqtt input config with buffer_size defaults and payload_key examples (#2283)
* pipeline: inputs: mqtt: update mqtt input config with buffer_size defaults and payload_key examples. Fixes #2282. Signed-off-by: Eric D. Schabell <eric@schabell.org> * pipeline: inputs: mqtt: updated description of payload_key as per review comments. Signed-off-by: Eric D. Schabell <eric@schabell.org> --------- Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent b98e343 commit eb4d867

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

pipeline/inputs/mqtt.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ The _MQTT_ input plugin retrieves messages and data from MQTT control packets ov
66

77
The plugin supports the following configuration parameters:
88

9-
| Key | Description | Default |
10-
|:--------------|:--------------------------------------------------------------------------------------------------------|:----------|
11-
| `Listen` | Listener network interface. | `0.0.0.0` |
12-
| `Port` | TCP port where listening for connections. | `1883` |
13-
| `Payload_Key` | Specify the key where the payload key/value will be preserved. | _none_ |
14-
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
9+
| Key | Description | Default |
10+
|:--------------|:--------------------------------------------------------------------------------------------------------|:-------------|
11+
| `buffer_size` | Maximum payload size (in bytes) for a single MQTT message. | `2048` |
12+
| `listen` | Listener network interface. | `0.0.0.0` |
13+
| `payload_key` | Field name where the MQTT message payload will be stored in the output record. | _none_ |
14+
| `port` | TCP port where listening for connections. | `1883` |
15+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
16+
17+
Notes:
18+
- `buffer_size` defaults to `2048` bytes; messages larger than this limit are dropped.
19+
- Defaults for `listen` and `port` are `0.0.0.0` and `1883`, so you can omit them if you want the standard MQTT listener.
20+
- Payloads are expected to be JSON maps; non-JSON payloads will fail to parse.
21+
22+
### TLS / SSL
23+
24+
The MQTT input plugin supports TLS/SSL. For the available options and guidance, see [Transport Security](../../administration/transport-security.md).
1525

1626
## Get started
1727

@@ -55,6 +65,7 @@ pipeline:
5565
tag: data
5666
listen: 0.0.0.0
5767
port: 1883
68+
payload_key: payload
5869

5970
outputs:
6071
- name: stdout
@@ -70,6 +81,7 @@ pipeline:
7081
Tag data
7182
Listen 0.0.0.0
7283
Port 1883
84+
Payload_Key payload
7385

7486
[OUTPUT]
7587
Name stdout

0 commit comments

Comments
 (0)