MQTT Configuration
This section describes settings that control the behavior of the MQTT protocol in YedMQ.
[mqtt]
sys_topic_interval_secs = 10
inflight_retry_interval_secs = 10
default_authentication = "deny"
default_authorization = "deny"
max_message_size = 268435456
| Configuration Item | Description | Default Value |
|---|---|---|
sys_topic_interval_secs | Interval for publishing system status to $SYS topics. | 10 |
inflight_retry_interval_secs | Interval for retrying unacknowledged (Inflight) messages. | 10 |
default_authentication | Default result when no authentication plugin handles a connection. Options: allow, deny. | deny |
default_authorization | Default result when no authorization plugin handles an action. Options: allow, deny. | deny |
max_message_size | Maximum allowed size (in bytes) for a single MQTT packet. | 268435456 (256MB) |
The shipped configuration keeps these defaults aligned with a secure first-run posture. For the current broker runtime, MQTT access is also governed by the plugin-host fallback values in Plugin Configuration, which are set to deny by default as well.
Protocol support
YedMQ accepts MQTT v3.1.1 and MQTT 5.0 clients on TCP, TLS, WS, and WSS listeners. MQTT 5.0 support covers the common broker flow: CONNECT, publish/subscribe, unsubscribe, ping, disconnect, QoS 0/1/2, retained messages, persistent sessions, Session Expiry Interval, Message Expiry Interval, shared subscriptions, REST-published messages, and $SYS topic delivery.
The broker advertises conservative MQTT 5.0 limits in CONNACK. Topic Alias Maximum is 0, Subscription Identifier Available is false, and Shared Subscription Available is true. Enhanced authentication, Topic Alias, and Subscription Identifier are rejected with MQTT 5.0 reason codes where the protocol allows a response.
Shared subscriptions use the $share/<group>/<filter> syntax. For live publishes, YedMQ delivers each matching message to one eligible member in each shared group, using deterministic round-robin selection inside the router actor. Normal non-shared subscriptions still fan out to every matching subscriber. Retained-message replay is handled for the subscribing client directly instead of being redistributed through the shared group.
MQTT 5.0 CONNECT, PUBLISH, and SUBSCRIBE metadata is exposed to plugins through the existing properties fields described in the Plugin Developer Guide.