Skip to content

Forwarding Destinations #406

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

timcowlishaw
Copy link
Contributor

This PR adds the concept of a "forwarding destintation" for devices, which allows us to reroute and transform MQTT forwarded messages for specific downstream research projects.

We can create a new forwarding destination in the console with eg ForwardingDestination.create(name: "important_eu_research_project"), this will then be made available, for researcher users, in the "forwarding destination" dropdown on the edit device page.

If a user selects a forwarding destination apart from the default on the device edit page, then this will be included as an extra parameter in the data_policy section on both the API and in forwarded MQTT packets.

This allows us to set up custom forwarding rules in EMQX for these packets.

We can also search for all devices which are forwarding to a given destination in the API:

/v0/devices/?q[forwarding_destination_name_eq]=important_eu_research_project

...and also for all users with at least one device that forwards to that destination:

/v0/users/?q[devices_forwarding_destination_name_eq]=important_eu_research_project

@timcowlishaw timcowlishaw requested a review from oscgonfer July 15, 2025 19:06
@timcowlishaw timcowlishaw linked an issue Jul 15, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add way to select where to forward to
1 participant