ww_mqtt_3
Subscribe to topics on MQTT brokers.
# Common config fields, showing default valuesinput: label: "" ww_mqtt_3: urls: - tcp://localhost:1883 client_id: "" filters: {} clean_session: true connect_timeout: 30s keepalive: 60s auth: username: "" password: ""
# Advanced config fields, showing default valuesinput: label: "" ww_mqtt_3: urls: - tcp://localhost:1883 client_id: "" filters: {} clean_session: true connect_timeout: 30s keepalive: 60s auth: username: "" password: "" enable_auto_ack: false
Uses mqtt input component found in wombatwisdom/components. It differs from the mqtt
input in that it exposes enable_auto_ack
, which is set to false by default.
MQTT Version
This component supports MQTT v3.1.1 protocol. For MQTT v5 support, use ww_mqtt_5 (coming soon).
Delivery guarantees
By default, this input disables auto acknowledgment to ensure at-least-once delivery semantics.
If message loss is acceptable, you can set enable_auto_ack: true
to enable at-most-once delivery.
Example: At least once
input: ww_mqtt_3: urls: - tcp://localhost:1883 filters: sensor/+/data: 1 clean_session: false enable_auto_ack: false # Ack will happen once output is done processing.
Example: at most once
input: ww_mqtt_3: urls: - tcp://localhost:1883 filters: metrics/#: 0 clean_session: true enable_auto_ack: true # Ack will happen once input receives message
Fields
urls
List of MQTT broker URLs to connect to.
Type: array
Default: ["tcp://localhost:1883"]
client_id
Unique client identifier. If empty, one will be generated.
Type: string
Default: ""
filters
Map of topic patterns to QoS levels to subscribe to.
Type: object
Default: {}
clean_session
Start with a clean session
Type: bool
Default: true
connect_timeout
Connection timeout
Type: string
Default: "30s"
keepalive
Keep alive interval
Type: string
Default: "60s"
auth
Authentication configuration
Type: object
auth.username
Username for authentication
Type: string
Default: ""
auth.password
Password for authentication
Type: string
Default: ""
enable_auto_ack
Enable automatic acknowledgment (paho SetAutoAckDisabled). When false (default), messages are ACK’d after processing (at-least-once). When true, messages are ACK’d immediately (at-most-once with higher throughput but message loss risk).
Type: bool
Default: false