aedes: [bug] Nolocal flag for bridges is not respected
System Information
- Aedes: 0.46.3
- NodeJS: 16.14.2 LTS
- Windows Server
- Arch: x86_64
Describe the bug
If I am not mistaken (and it could easily be that I am mistaken) then the nolocal
flag is not respected by Aedes:
https://github.com/mqtt/mqtt.org/wiki/bridge_protocol
the subscriptions are nolocal (in the JMS sense), to reduce the chances of infinite message loops.
Basically what happens is that when I connect to Aedes broker as a broker and publish a message to the Aedes broker while also subscribing on ‘#’, I receive the message that I have just published.
Could you please point me to the piece of Aedes code where you potentially do something like:
if (subscription.nl === true && targetClient.id === fromClient.id) {
dontSendThePacket()
}
As much as I read the Aedes code, I could not find any nl === true
or similar handling.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (24 by maintainers)
Invitation to team sent and repo created: https://github.com/moscajs/aedes-bridge
If you need any help reach me here or also via Github team discussions 😄
Happy to have you in our team 🚀
Thanks, a repo would be nice 👍
With regards to joining the org - sure why not. We are going to use Aedes at work so it kind of make sense to help Aedes. 😊
To make the tests not fail,
aedes-persistence
needs to persistrh
,nl
andrap
and to makeaedes-persistence
to work, theqlobber
also needs to understand the flags.Thanks, I will write the new unit tests next week. 👍