← Back to team overview

mqtt-users team mailing list archive

Re: mqtt broker persistent configurations

 

Hi Stefano,

This is part incorrect behaviour, part difficult to deal with
behaviour. The connection information in $SYS being saved to
mosquitto.db is incorrect and this has already been fixed for version
0.16.

The other side of the behaviour you are seeing is most probably around
the direction of the topics. In you specify an "in" topic (i.e. this
broker subscribes to a topic on the remote broker) and then
disconnect, the remote broker will keep that subscription information
because by default bridge connections have cleansession set to false.
If you subsequently reconnect the bridge, everything will operate as
you would expect. If instead you change the topic direction to "out"
and then reconnect, the remote broker will still have your
subscription and so still send you messages even though your
configuration doesn't ask for them. The same problem exists for "both"
type topics changing to "out".  Changes in 0.16 help here too - any
topics to be bridged with "out" direction will have an UNSUBSCRIBE
command sent to the remote broker to ensure that any existing
subscriptions are removed.

The port settings should not be saved and should make no difference to
the above behaviour.

In the short term as you are experimenting the solution is to either
delete mosquitto.db on each restart with a changed configuration or
set "persistence" in mosquitto.conf to false.

I hope this helps,

Roger


On Tue, Jun 12, 2012 at 2:01 PM, stefano costa
<stefano.costa@xxxxxxxxxxx> wrote:
> I'm testing some features of mosquitto as a broker, and I'm now realizing
> that when I change configurations items in "mosquitto.conf" and stop/start
> mosquitto (daemon) not everything can be considered updated. As an example:
> if I configure a bridge between two brokers (in two different machines) and
> test it, and then I change the ports for both sides, it seems from the $SYS
> info (and observing the behaviour also) that the previous configuration
> exist along with the new one.
>
> Is this anything intentional, and how to reset? Should I delete the db file
> each time I change .conf?
>
> Thanks S
>
> --
>  Stefano Costa, R&D Manager
>  M +39 335 6565749
>  Skype stefanocosta.bluewind
>  http://www.bluewind.it/stefanoco?code=1
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~mqtt-users
> Post to     : mqtt-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mqtt-users
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References