首页 > 解决方案 > mosquitto.conf:带空格的桥接主题名称

问题描述

我需要将给定的托皮斯从一只蚊子连接到另一只蚊子。问题是主题中有空格:

/sensors/DS 1
/sensors/DS 2
/sensors/..
/sensors/DS 32

我正在寻找一种解决方案,如何仅配置我需要的几个主题:

# /etc/mosquitto/conf.d/bridge.conf
# ...

# This works fine but produces unwanted traffic:
topic /sensors/# out 1

# This all doen't work:
topic /sensors/DS\ 4 out 1
topic '/sensors/DS 4' out 1
topic "/sensors/DS 4" out 1

无论如何,我正在赶上Error: Invalid bridge topic direction '4'.

有可能解决这个问题吗?

mosquitto version 1.4.15 (build date Thu, 07 Jun 2018 19:59:46 +0300)

蚊子.CONF(5)

已创建UPD错误报告:https ://github.com/eclipse/mosquitto/issues/1756

标签: mqttmosquitto

解决方案


推荐阅读