Hey Andy, What version of mosquitto are you running unless you are compiling from the latest trunk I do not think it is possible and even if you are maybe not. I posted a very similar question to the mailing list a while back, here is that correspondence:
*My question:* I am trying to configure two mosquitto brokers to use bridges in the following way: I want a 'master' broker and several 'site' brokers. I want the site brokers to be configured as follows: The site broker will suscribe to the topic <SITE-ID>/# on the master broker and map all incoming messages to the local topic #. So a message published to <SITE-ID>/test on the master will be published to the topic "test" on the site broker. For outgoing messages I want anything published to a topic on the site broker to be published to the same topic on the master broker Bridge config that doesnt work" connection test address <IP-ADDRESS-OF-MASTER> cleansession true topic # out 0 topic # in 0 "" <SITE-ID>/ Note that the almost identical configuration on RSMB works: connection test address <IP-ADDRESS-OF-MASTER> cleansession true topic # out topic # in "" <SITE-ID>/ *Response:* Hi Erik, After our conversation on irc last night I ended up coming up with part of the solution in a doze this morning: https://bitbucket.org/oojah/mosquitto/commits/987fd56b34b876333da2de793523adbe83810fe2 It doesn't fix the whole problem generally, but should work for your case. Cheers, Roger On Thu, Nov 28, 2013 at 9:06 AM, andy murdoch <a...@andymurdoch.com> wrote: > Hi all, > > I have set up a bridge from msoquitto on a remote device to mosquitto on a > central server - it was awesomely easy! > > Now I would like to know if it is possible to add the remote username in > the bridge's topic mapping, like I can in an ACL. > > I have this in my remote device's mosquitto.conf: > > connection testbridge > address 192.168.1.10 > topic /test/# in 2 /server"" > topic /test/# out 2 "" /remote/%u > > But publishing to /test/hello results in /remote/%u/test/hello across the > bridge - the %u is not replaced. > > Does anyone have an ideas as to how I can accomplish this? Is it even > possible? Is it a dumb idea? > > Thanks in advance. > > - Andy > > -- > Mailing list: https://launchpad.net/~mosquitto-users > Post to : mosquitto-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~mosquitto-users > More help : https://help.launchpad.net/ListHelp > >
-- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~mosquitto-users More help : https://help.launchpad.net/ListHelp