Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ef0b03c
F-15426 - Reset caller SN_Object before decoding into it on ANY wait
embhorn Oct 15, 2026
cd4dae3
F-15431 - Treat zero-byte PUBLISH payload read as a network error
embhorn Oct 15, 2026
1c2f0be
F-13804 - Map zero and terminal TLS read/write results to network errors
embhorn Oct 15, 2026
0bdcd78
F-13802 - Drop queued PUBLISH that does not fit the subscriber tx buffer
embhorn Oct 15, 2026
3a85f3e
F-15373 - Reset wait state when the automatic ack fails to encode
embhorn Oct 15, 2026
f806f3a
F-11485 - Ignore PUBACK for an outbound QoS 2 delivery
embhorn Oct 15, 2026
600db88
F-11478 - Publish the Will when a v5 DISCONNECT fails to decode
embhorn Oct 15, 2026
296355c
F-13236 - Send Protocol Error DISCONNECT on Session Expiry 0 to non-zero
embhorn Oct 15, 2026
1f2302d
F-11489 - Advertise Shared Subscriptions as unavailable and refuse them
embhorn Oct 15, 2026
058952a
F-12448 - Bound v5 ack, DISCONNECT and AUTH decoding to Remaining Length
embhorn Oct 15, 2026
19aac65
F-11484 - Do not acknowledge a PUBLISH whose fan-out could not be queued
embhorn Oct 15, 2026
7e4ce9b
F-13225 - Refuse CONNECT when the Will cannot be stored in full
embhorn Oct 15, 2026
a8f9891
F-14194 - Refuse QoS>0 publish with no replay slot on a persistent se…
embhorn Oct 15, 2026
9cac822
F-12447 - Reject MQTT-SN ClientIds longer than 23 characters
embhorn Oct 15, 2026
cd4123f
F-11479 - Report listener accept failures from MqttBroker_Step
embhorn Oct 15, 2026
12112eb
F-13227 - Report namespace directory fsync failures in POSIX persistence
embhorn Oct 15, 2026
6823c9f
F-11483 - Report I/O failures from the POSIX persistence iterator
embhorn Oct 15, 2026
778379e
F-11481 - Propagate sync hook failures from persistence commit helpers
embhorn Oct 15, 2026
6d2d27e
F-11480 - Report failures from dynamic BrokerPersist_DelOutQueue
embhorn Oct 15, 2026
ce98194
F-12446 - Stamp META only after a complete schema-mismatch wipe
embhorn Oct 15, 2026
75f9ccf
F-11482 - Fail persistence restore on allocation failure
embhorn Oct 15, 2026
7abb13f
F-11492 - Bind encrypted persistence records to namespace and key
embhorn Oct 15, 2026
1d9e1f4
F-13261 - Scrub rx_buf when cancelling an active receive
embhorn Oct 15, 2026
8ba0bd4
F-13260 - Scrub rx_buf on terminal receive errors
embhorn Oct 15, 2026
68ebd2b
F-12509 - Scrub client buffers when abandoning the network connection
embhorn Oct 15, 2026
8204d3d
F-12465 - Correct the Receive Maximum quota-release comment
embhorn Oct 15, 2026
f780893
F-12470 - Document the sleep DISCONNECT wait in SN_Client_Disconnect_ex
embhorn Oct 15, 2026
0d54b71
F-12471 - Update the CONNECT Session Present comment
embhorn Oct 15, 2026
6c2571f
F-13231 - Correct the persistence hook key length contract
embhorn Oct 15, 2026
4cf2ce3
Test fix - Give the retained-persistence test fixture a derive_key hook
embhorn Oct 15, 2026
233b796
Fix from review
embhorn Oct 16, 2026
8fe50f2
Fix from review
embhorn Oct 16, 2026
f9f9a54
Fix from review
embhorn Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BROKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,7 @@ The CONNECT-handler unit test (`tests/test_broker_connect`) is part of `make che
## Limitations

The wolfMQTT broker targets embedded and edge use cases. It is intentionally smaller in scope than full-featured server brokers such as Mosquitto or EMQX: there is no clustering, no bridging, no plugin/ACL framework, and no dynamic configuration reload. For large-scale or feature-rich deployments use a dedicated server broker; for a small, auditable, optionally-TLS broker that runs without threads or a heap, wolfMQTT is a good fit.

Fan-out of a PUBLISH to its subscribers is not atomic. If the broker runs out of memory part-way through queueing copies of a QoS 1 or QoS 2 message, subscribers already served keep their copy and the publisher is not told the message was accepted: an MQTT v5 publisher receives a PUBACK or PUBREC with Reason Code 0x80, and an MQTT v3.1.1 publisher is disconnected. For a v3.1.1 QoS 2 publisher with a persistent session, the retransmitted PUBLISH is then treated as a duplicate, so subscribers that missed the original fan-out do not receive it.

A single MQTT v5 packet may carry at most `MQTT_MAX_PROPS` (default 30) properties. The MQTT specification sets no such limit, but the broker rejects a packet with more properties as it would a malformed one. For a DISCONNECT this means the connection is treated as closed abnormally, so the client's Will Message is published even when the Reason Code is 0x00 (Normal disconnection). A DISCONNECT within the limit whose properties cannot be allocated because the broker is out of memory is still handled according to its Reason Code.
733 changes: 546 additions & 187 deletions src/mqtt_broker.c

Large diffs are not rendered by default.

Loading
Loading