Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Remove leading slash in topic name in bridge remapping

Hi everyone,

I am trying to configure an MQTT bridge that will remap the topic `/test/sensor/+` to `test/sensor/+` (i.e. remove the leading slash) on the remote broker.

This is the corresponding line from my Mosquitto config
topic /test/sensor/+ out "/" ""

My understanding is that the line above says that the local prefix is "/" and it should be mapped to the remote prefix "" (empty string), thus I expect that the first slash should be gone.

Mosquitto's log shows me a line that confirms that the broker received the message and is republishing it, however nothing arrives to the other broker (which is RabbitMQ with an MQTT plugin). Thus, my questions are:

1. Is removing the leading slash feasible?
2. If so, how can my configuration line be adjusted, to make it happen?
3. Is it possible to configure Mosquitto to log the name of the remapped topic? (perhaps this could aid me in debugging)

Thank you for your advice on this matter,
Alex

Back to the top