Skip to content

MQTT

MQTT (mqtt)

Ingest events from MQTT brokers (client mode) or an embedded broker (broker mode).

Messaging binary json raw

Minimal example

input:
mqtt:
broker: {}
client:
endpoint: ""
JSON
{
"input": {
"mqtt": {
"broker": {},
"client": {
"endpoint": ""
}
}
}
}

Contents

Fields

FieldTypeRequiredDescription
clientMQTT Client PublisherConnect to an external MQTT broker as a client subscriber.
brokerMQTT Embedded Broker PublisherRun an embedded broker and surface publishes into the pipeline.

Schema

MQTT Client Publisher - Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

MQTT Client Publisher - MQTT TLS Fields

FieldTypeRequiredDescription
ca-certificatestringOptional CA certificate (PEM encoded).
client-certificatestringOptional client certificate (PEM encoded).
client-keystringOptional client private key (PEM encoded).

MQTT Client Publisher - MQTT Dead Letter Fields

FieldTypeRequiredDescription
topicstringTopic to publish failed messages to once retries are exhausted.
qosnumberQoS level for dead-letter publishes (0 or 1).
Default: 0
retainboolean (bool)Whether the dead-letter publish should retain the message.
Default: false

MQTT Client Publisher Fields

FieldTypeRequiredDescription
retryRetryRetry policy for publish failures.
endpointhostname (string)Broker endpoint URI (e.g. mqtt://broker:1883 or mqtts://broker:8883).
Examples: example.com, localhost
protocolMQTT ProtocolMQTT protocol version used for publishing.
Allowed values: v3, v5
client-idstringOptional client identifier override.
keep-alive-secsnumber (integer)Keep-alive interval in seconds.
Default: 30
Examples: 42, 1.2e-10
clean-sessionboolean (bool)Whether to request a clean session on connect.
Default: true
usernamestringOptional username for broker authentication.
passwordstringOptional password for broker authentication.
tlsMQTT TLSTLS material for secure connections.
request-channel-capacitynumber (integer)Request channel capacity for the client worker.
Default: 10
Examples: 42, 1.2e-10
inflightnumber (integer)Maximum inflight window for QoS1 publishes.
Default: 100
Examples: 42, 1.2e-10
qosnumberPublish QoS level (0 or 1).
Default: 0
retainboolean (bool)Whether publishes should set the retain flag.
Default: false
topicstringStatic topic to publish to when dynamic selectors are absent.
topic-fieldfield (string)Event field to resolve the topic from at runtime.
Examples: data_field
topic-pointerjson-pointer (string)JSON pointer to resolve the topic from at runtime.
payload-modePayload ModeControls how event payloads are encoded prior to publish.
Default: auto
Allowed values: auto, json, raw, binary
pool-sizenumber (integer)Number of MQTT client connections maintained for parallel publishing.
Default: 1
Examples: 42, 1.2e-10
response-topicstringOptional response topic for MQTT v5 publishes.
correlation-datastringOptional correlation data (base64 encoded) for MQTT v5 publishes.
message-expiry-interval-secsnumber (integer)Optional message expiry interval (seconds) for MQTT v5 publishes.
Examples: 42, 1.2e-10
dead-letterMQTT Dead LetterDead-letter behaviour when retries are exhausted.

MQTT Embedded Broker Publisher - Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

MQTT Embedded Broker Publisher - Listener Fields

FieldTypeRequiredDescription
bindhostname (string)Socket address in host:port form for the embedded broker listener.
Examples: example.com, localhost
tlsboolean (bool)Whether TLS should be enabled for this listener (placeholder).
Default: false

MQTT Embedded Broker Publisher Fields

FieldTypeRequiredDescription
retryRetryRetry policy applied before surfacing broker publish failures.
qosnumberPublish QoS level (0 or 1).
Default: 0
retainboolean (bool)Whether embedded broker publishes should set the retain flag.
Default: false
topicstringStatic topic used when dynamic selectors are absent.
topic-fieldfield (string)Event field to resolve the topic from.
Examples: data_field
topic-pointerjson-pointer (string)JSON pointer to resolve the topic from.
payload-modePayload ModeControls how payloads are encoded prior to publish.
Default: auto
Allowed values: auto, json, raw, binary
listenersListener[]Listener surfaces to bind for the embedded broker.
persistence-pathstringOptional on-disk directory for broker persistence (defaults to job data dir).
topic-prefixstringOptional prefix applied to topics before publishing into the embedded broker.
worker-threadsnumber (integer)Number of worker threads dedicated to the embedded broker runtime.
Default: 1
Examples: 42, 1.2e-10

MQTT Client Publisher - MQTT Protocol Options

ValueNameDescription
v3v3V3
v5v5V5

MQTT Client Publisher - Payload Mode Options

ValueNameDescription
autoautoAuto
jsonjsonJson
rawrawRaw
binarybinaryBinary

MQTT Embedded Broker Publisher - Payload Mode Options

ValueNameDescription
autoautoAuto
jsonjsonJson
rawrawRaw
binarybinaryBinary