mosquitto.config file is throwing error in docker

已查看 315 次
跳至第一个未读帖子

Bilal Malik

未读,
2020年6月12日 06:02:182020/6/12
收件人 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

未读,
2020年6月12日 07:12:162020/6/12
收件人 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.
回复全部
回复作者
转发
0 个新帖子