MQTT source
The mqtt source connects to an MQTT broker and subscribes to a topic. Each message received on the topic becomes a log event.
Configuration
Options
| Option | Type | Default | Description |
|---|---|---|---|
broker | string | required | MQTT broker address (e.g. "tcp://host:1883", "ssl://host:8883") |
clientID | string | required | Client identifier for the MQTT connection |
topic | string | required | Topic to subscribe to |
userName | string | "" | Authentication username |
password | string | "" | Authentication password |
qos | int | 0 | Quality of Service level: 0 (at-most-once), 1 (at-least-once), 2 (exactly-once) |
retained | bool | false | Subscribe to retained messages |
Event fields
| Field | Value |
|---|---|
sourceType | "mqtt" |
rawLog | Message payload |
eventTime | Current time when the message is received |