-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT Bridge - Allow prefix/suffix to remap of topics #1746
Comments
Thank you for taking the time to share your suggestion with us. Your proposed enhancement is indeed interesting and aligns well with our goals for further development. We will carefully consider it as we plan our roadmap for future updates. |
Nope, MQTT forbidden you to publish msg to wildcard. simply cannot. we probably gonna add a new config param in bridging section: prefix and suffix |
Is your feature request related to a problem? Please describe.
Configuring a bridge, if you try to rewrite the topic with a wildcard:
It shows:
2024-04-13 16:47:23 [1] ERROR /home/runner/work/nanomq/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:970 conf_bridge_node_parse: No wildcard +/# should be contained in remote topic in forward rules.
Similar issues: #1684, #1463, #1174 (comment)
Describe the solution you'd like
Similar to what eclipse mosquitto allows: "The local-prefix and remote-prefix options allow topics to be remapped when publishing to and receiving from remote brokers. This allows a topic tree from the local broker to be inserted into the topic tree of the remote broker at an appropriate place." (https://mosquitto.org/man/mosquitto-conf-5.html)
As example, in mosquitto, that configuration line allows to remap (adding a prefix in the remote topic) with a wildcard:
topic topic1/# both 0 "" device_id/
Describe alternatives you've considered
Right now, the alternative I've tested is:
{
remote_topic = ""
local_topic = "device_id /topic1/#"
}
That works, but it doesn't allow a topic to be remapped with a wildcard, moving more work to the local configuration part.
The text was updated successfully, but these errors were encountered: