Skip to content

Conversation

@itsmylife
Copy link
Contributor

@itsmylife itsmylife commented Aug 8, 2025

What is this?

In this PR each request has a unique streaming key with orgId to identify the organizations. So different organizations will have separate streams. On the frontend we generate and send that key and on the backend we use it to store the topic and use orgID provided. If the orgID is different than the plugin configuration this will return an error and subscribing to the stream will be failed.

The idea was taken from

How to test?

  • In mqtt repository
    • Run mage -v
    • Run yarn dev
    • Run yarn broker
  • In grafana repository
    • Run grafana as usual
  • Create an mqtt datasource
  • Run query for millisecond/1000 and see in developer tools it's sending a streaming key with orgID.
@itsmylife itsmylife changed the title Add streaming key to the streams Add streaming key to the requests Aug 8, 2025
@itsmylife itsmylife requested a review from aangelisc August 26, 2025 20:07
@itsmylife itsmylife marked this pull request as ready for review August 26, 2025 20:07
@itsmylife itsmylife requested a review from zoltanbedi as a code owner August 26, 2025 20:07
@itsmylife itsmylife requested a review from a team as a code owner August 26, 2025 20:08
zoltanbedi
zoltanbedi previously approved these changes Sep 1, 2025
Copy link
Member

@zoltanbedi zoltanbedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, other than that LGTM

})
);

// const ds = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment?

Copy link

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@itsmylife itsmylife merged commit 1ba1ea2 into main Sep 3, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this to Complete in OSS Big Tent Sep 3, 2025
@itsmylife itsmylife deleted the ismail/add-orgid-as-streaming-key branch September 3, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants