我正在尝试在同一系统上桥接两个 MQTT 代理,HiveMQ并且Mosquitto. HiveMQ正在端口上工作1884并Mosquitto正在运行1883。但是,当我使用mosquitto_pub命令在端口发布到mosquitto代理时1883,它不会显示在端口上1884(MQTT.fx用作订阅端口上所有主题的客户端1884)
这是我只为mosquitto代理配置了一个网桥。当我也配置时HiveMQ,它只在命令窗口上显示一条unable to connect to Bridge1, disconnected消息。HiveMQ我已经包含了下面的配置。有人请帮忙。
在mosquitto.config文件中,我在bridges.
connection hivemq
address 127.0.0.1:1884
start_type automatic
clientid clientno1
notifications true
同时,我还编辑了HiveMQ bridges.xml文件以读取
<?xml version="1.0" encoding="UTF-8"?>
<bridges xsi:noNamespaceSchemaLocation="http://www.hivemq.com/bridges/bridge.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<bridge>
<connectionName>Bridge1</connectionName>
<addresses>
<address>
<host>localhost</host>
<port>1883</port>
</address>
</addresses>
<clientId>bridgeClient</clientId>
<topicPatterns>
<topicPattern>
<topic>#</topic>
<qos>1</qos>
<direction>both</direction>
<localPrefix>local/</localPrefix>
<remotePrefix>remote/</remotePrefix>
</topicPattern>
</topicPatterns>
<cleanSession>true</cleanSession>
<idleTimeout>10</idleTimeout>
<notificationsEnabled>true</notificationsEnabled>
<tryPrivate>true</tryPrivate>
</bridge>

显示的图像是当我在另一个系统上尝试相同的过程时。在这里,经纪人被桥接。与我之前所做的比较,唯一的区别是在我的原始系统上没有声明说在 1883 上打开 ipv4 侦听套接字。这是问题吗?