Feature to add a topic remapping when in bridge mode #127
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.
Hey guys,
I added a feature which allows 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.
It is similar to the remote-prefix parameter in mosquitto.
When sending messages to a remote bridge server, the topic defined in
subscribe
orpublish
can be prepended with aprefix
.The difference to mosquitto is, that only the published or subscribed remote topic is prefixed. The local topic is not changed (like
local-prefix
in mosquitto does).Example 1: Publish all messages in all local topics to the remote system under topic
bridge1/
and receive all messages from the remote system in topicbridge1/
in local. For instance, the local topichome/sensor1/temp
becomesbridge1/home/sensor1/temp
on the remote site and vice versa.Example 2: Publish all messages from local
topic1/
to the remote system underbridge1/topic1/
and receive all messages from the remote system underbridge1/topic2/
to localtopic2/
.I would appreciate it if you have look at the new feature or maybe you like to merge it into your repo.
Kind regards.