← Back to team overview

mosquitto-users team mailing list archive

Re: Bridging issues

 

Hi Michael,

> First issue is if I use a username/password for the bridge.  I see that the
> slave connects, connects to the three topics that I want it listening to,
> and then a socket error.
>
> Slave output:

...

> 1343748661: Received PUBREC from
> test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 11)

I'm a bit concerned as to where this is coming from and the same on
the master side. I wonder if the problem is related to undelivered
messages stored on the master. Could you try putting your mosquitto.db
to one side on the master and the slave and restarting them?

If this works it only fixes the symptom not the problem, but it's
useful to know what's going on.

> The second issue presents itself if I don’t have a username/password set for
> the bridge, I have an ACL still set, but anonymous users can read from the
> topics I wish to subscribe to.  I can successfully bridge the slave to the
> master and messages that are published to the master are in turn published
> to the slave but the slave does not publish those messages to other clients
> listening to those messages.  If I publish directly to the slave the clients
> do get the messages that they are subscribed to.

This is down to ACLs being applied to local bridges but having no
mechanism to set a local username/password as well as a remote
username/password. I did fix it so that local bridges aren't
constrained by local ACLs but it looks like that change has gone
astray in some code rearrangement. I've put the fix back in if you
want to give it a try.

Cheers,

Roger


Follow ups

References