-
Notifications
You must be signed in to change notification settings - Fork 38
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
broker [NET-573]: MQTT plugin improvements #272
Conversation
NET-573 Bug in mqtt broker plugin
There is a bug with the mqttplugin (not legacy) in Bridge.ts in the onSubscribed method: each time subscribe is called on the mqttbroker, a new listener is added, that subscribes to the stream on streamrnetwork. The bug can be reproduced on the tmp_bug_mqttplugin branch, where the legacymqtt plugin is replaced with the mqttplugin in the local-propagation integration test. Run the test by running npm run t in broker package Open questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
…rge_main * origin/main: (34 commits) broker [NET-573]: MQTT plugin improvements (#272) style(client): fix eslint error Fix broken browser tests (#269) client [NET-571]: Using the Brubeck client without providing a private key (#268) ci: specify exact action versions for easy debugability (#266) ci(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#271) docs(broker): fix mqtt example fix(broker): rely on default value for config.network.webrtcDisallowPrivateAddresses fix(broker): fix default value type in schema release: cli-tools 6.0.0-alpha.0 fix: cli-tools work with alpha client test(network): fix describe Update README.md style(broker): break up log line ci(test-utils): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(protocol): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(network): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-dataunions): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-code): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-build): replace styfle/cancel-workflow-action with GitHub Actions concurrency ... # Conflicts: # packages/broker/src/broker.ts # packages/cli-tools/src/publish.ts
* main: ci: Use nick-invision/[email protected] instead of nick-invision/[email protected]. broker [NET-573]: MQTT plugin improvements (#272)
* NET-542-brubeck-client-browser: fix(broker): Fix merge issues. ci: Use nick-invision/[email protected] instead of nick-invision/[email protected]. broker [NET-573]: MQTT plugin improvements (#272)
Fixes:
A message was delivered to a subscriber twice if it was published by a MQTT client. Now we store message chain ids of the message which are published via MQTT server. We don't re-deliver those messages as Aedes mirrors the messages to all subscribers. (Aedes doesn't have a feature for disabling mirroring. If it had, that would be an alternative way to implement the functionality.)
A message was delivered multiple times if there were multiple subscribers. Now we subscribe to
streamrClient
only once. Messages are delivered to the MQTT server and it propagates the messages to all subscribers.A subscription was unsubscribed if any of the clients unsubscribed the topic. Now we store list of
clientId
s and unsubscribes only if all clients have unsubscribed.Unsubscribes can't interfere other plugins. The MQTT plugin explictly unsubscribes from the subscriptions it has created.