Repository navigation
Per-broker MQTT topic templates - #33
Merged
Merged
Conversation
Ported from OwlShack: packetTopic and statusTopic take {iata} {pubkey}
{name} and meshcoretomqtt's uppercase tokens. Unset keeps the
topicPrefix layout, so existing configs publish where they did. One
resolver now serves the packet topic, the status topic and the offline
will, which used to build the status topic separately. Unknown
placeholders and wildcards are refused when the config loads.
tuzzmaniandevil
force-pushed
the
feat/mqtt-topic-templates
branch
from
October 8, 2026 23:58
e8bdf11 to
ccc4fa9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports OwlShack's per-broker topic templates.
packetTopic/statusTopicon a broker, with{iata}{pubkey}{name}and meshcoretomqtt's uppercase tokens ({IATA},{PUBLIC_KEY}, ...). Same placeholder set as OwlShack.<topicPrefix>/{iata}/{pubkey}/packets|status, so existing configs publish exactly where they did. OwlShack foldstopicPrefixinto the templates and deprecates it; here it simply stays the fallback, no config rewrite.resolveTopicsnow serves the packet topic, the status topic and the offline last-will, whichconnectBrokerused to build separately.Testing
topicPrefixtopics unchanged, templates and uppercase tokens expand, bad templates refused naming the broker. Mutation-checked (validation made a no-op fails).packetTopic = "custom/{IATA}/{name}/pkt",statusTopic = "custom/{pubkey}/state", fed by a fake KISS modem: packet rows oncustom/akl/Topic Obs/pkt,onlineon the custom status topic, andofflinethere both from a clean shutdown and from the broker's last-will afterkill -9. No publish errors.-race.Touches the same changelog list as #32; whichever merges second may need a rebase.