mosquitto.config file is throwing error in docker

330 views
Skip to first unread message

Bilal Malik

unread,
Jun 12, 2020, 6:02:18 AM6/12/20
to MQTT
i have the following mosquito config file. It is working perfectly if I removed the last four lines otherwise it throws the following error
1591954888: Error: Invalid bridge configuration.
1591954888: Error found at /mosquitto/config/mosquitto.conf:8.

I am running mosquito in docker container
 Please have a look in the file and hep me to solve this error

allow_anonymous false
password_file /mosquitto/config/pwfile
port 1883
listener 9001
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
cleansession true
max_queued_messages 1000000
topic # out 2 devices/messages/events/ devices/messages/events/
topic # in 2 devices/messages/events/ devices/messages/events/

Roger Light

unread,
Jun 12, 2020, 7:12:16 AM6/12/20
to MQTT
Hi Bilal,

The "topic" lines are only valid with a bridge configuration.

Try:

connection <name>
address <your-broker>:<port>
topic # both 2

There is no need to supply topic prefixes if they are identical.

Regards,

Roger
> --
> To learn more about MQTT please visit http://mqtt.org
> ---
> You received this message because you are subscribed to the Google Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/8b1bfd5e-3ad0-4552-afc0-429b0ebc8007o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages