Skip to content

add ACL support, fix wildcard routing and QoS >0 crash#47

Open
durrendal wants to merge 1 commit intopython36:masterfrom
durrendal:acl-qos-wildcard
Open

add ACL support, fix wildcard routing and QoS >0 crash#47
durrendal wants to merge 1 commit intopython36:masterfrom
durrendal:acl-qos-wildcard

Conversation

@durrendal
Copy link
Copy Markdown

@durrendal durrendal commented Feb 13, 2026

This change adds Mosquitto compatible ACL file support (user/topic rules, pattern rules with %u/%c substitution).

Replaces broken topic routing with trie-based index. The broker previously only matched the literal "#" and exact topic string, so subscribers on filters like foo/# or foo/+/bar never received messages. The trie resolves matches in O(topic depth) instead of O(subscription count).

Replaces assert statements in onPubAck, onPubRec, onPubRel, and onPubComp with graceful checks. The asserts crash the broker under normal QoS > 0 operation when work queue state doesn't match expectations due to timing or msgId reuse.

2026-02-12-233438_1366x768_scrot

For color/context, I'm working on building a SaltStack like configuration management tool with nmqtt as the MQTT broker/client in that stack. Adding ACL handling and trie topic parsing will allow me to replace Mosquitto in that setup with a custom nmqtt based broker.

Tangentially, I've also ported nmqtt and its build deps to Alpine Linux as part of that same effort.

This change adds Mosquitto compatible ACL file support (user/topic rules, pattern rules with %u/%c substitution).

Replaces broken topic routing with trie-based index. The broker previously only matched the literal "#" and exact topic string, so subscribers on filters like foo/# or foo/+/bar never received messages. The trie resolves matches in O(topic depth) instead of O(subscription count).

Replaces assert statements in onPubAck, onPubRec, onPubRel, and onPubComp with graceful checks. The asserts crash the broker under normal QoS > 0 operation when work queue state doesn't match expectations due to timing or msgId reuse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant