Skip to content
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

Dynamic Topic Bridging #292

Open
david-katz opened this issue Oct 17, 2016 · 2 comments
Open

Dynamic Topic Bridging #292

david-katz opened this issue Oct 17, 2016 · 2 comments
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.

Comments

@david-katz
Copy link

Problem:
mosquitto is being used as a bridge for multiple local clients that are subscribing to topics on a remote MQTT broker.

There is a large number (1000s) of topics under the same root (a/1, a/2, a/2/x etc.) The local clients are only interested in a small subset (ca. 5) of all a/# topics, but will decide at runtime which of these topics are relevant to them.

The communications link between the bridge and the remote broker is expensive, so that messages on non-relevant topics must not be transmitted.

In order to solve this problem, I would like to discuss the possibility of introducing the following functionality to the mosquitto bridge:

  • allow the bridge to be configured to bridge certain topic ranges (for instance a/#) without causing a subscription to happen on this range at bridge startup time.
  • only if a subscription request is submitted by one of the bridge's local clients will a subscription be sent to the remote broker.
  • when the local client unsubscribes, the subscription on the remote broker is also unsubscribed.
@ralight
Copy link
Contributor

ralight commented Oct 26, 2016

Sorry for the delay in responding, I'm completely swamped at work at the moment and that has an impact on the free time I have for mosquitto.

I think this sounds like an interesting idea and initially positive about it - but haven't had chance to think about the implications yet.

@aeri
Copy link

aeri commented Dec 7, 2022

  • only if a subscription request is submitted by one of the bridge's local clients will a subscription be sent to the remote broker.
  • when the local client unsubscribes, the subscription on the remote broker is also unsubscribed.

I find these points really interesting, since the Issue is several years old, is it possible to do this with the latest versions of Mosquitto or is something similar planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Projects
None yet
Development

No branches or pull requests

4 participants