AG - 29 - Refactor MQTT data topics and gateway heartbeat usage#48
Open
rodneyosodo wants to merge 2 commits into
Open
AG - 29 - Refactor MQTT data topics and gateway heartbeat usage#48rodneyosodo wants to merge 2 commits into
rodneyosodo wants to merge 2 commits into
Conversation
JeffMboya
reviewed
May 22, 2026
JeffMboya
left a comment
There was a problem hiding this comment.
Review of gateway topic and heartbeat channel changes.
|
|
||
| var nodeRedTopicPattern = regexp.MustCompile(`m/[^/"'\s]*/c/[^/"'\s]*/(?:data|msg)`) | ||
| var nodeRedTopicPattern = regexp.MustCompile(`m/[^/"'\s]*/c/[^/"'\s]*/(?:data|msg|gateway/telemetry)`) | ||
|
|
There was a problem hiding this comment.
nodeRedTopicPattern now matches gateway/telemetry; old /msg still valid?
| return nodeRedTopicPattern.ReplaceAllString(value, fmt.Sprintf("m/%s/c/%s/msg", domainID, channelID)) | ||
| return nodeRedTopicPattern.ReplaceAllString(value, fmt.Sprintf("m/%s/c/%s/gateway/telemetry", domainID, channelID)) | ||
| } | ||
|
|
There was a problem hiding this comment.
Existing NodeRed flows publishing to /msg will be silently misrouted.
| t = fmt.Sprintf("m/%s/c/%s/gateway/telemetry", domainID, a.config.Channels.DataChan()) | ||
| default: | ||
| t = fmt.Sprintf("m/%s/c/%s/res/%s", domainID, a.config.Channels.CtrlChan(), topic) | ||
| } |
There was a problem hiding this comment.
Data topic path change; consumers on /msg path will miss messages.
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
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.
What does this do?
Which issue(s) does this PR fix/relate to?
Resolves #29
List any changes that modify/break current functionality
Have you included tests for your changes?
Did you document any new/modified functionality?
Notes