我想在同一個系統上橋接兩個MQTT經紀人,HiveMQ
和Mosquitto
。 HiveMQ
正在關注端口1884
和Mosquitto
正在運行於1883
。然而,當我使用mosquitto_pub
命令在端口1883
發佈到mosquitto
經紀人,它不會在端口1884
顯示(使用MQTT.fx
作爲客戶端訂閱端口的所有主題1884
)橋接mqtt經紀人hivemq和蚊子
這是當我只配置了經紀人與一座橋。 當我配置了HiveMQ
時,它只在HiveMQ
命令窗口中顯示unable to connect to Bridge1, disconnected
消息。我已經包含了下面的配置。有人請幫忙。
在mosquitto.config
文件中,我在bridges
下完成了以下操作。
connection hivemq
address 127.0.0.1:1884
start_type automatic
clientid clientno1
notifications true
同時,我也editted的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偵聽套接字。這是問題嗎?
我只在'mosquitto'上配置了網橋,並且現在還在配置文件的主題行中添加了該網橋。仍然沒有橋接。 – avelampudi
蚊子輸出是否顯示有關橋的任何事情? – hardillb
什麼也沒有。我無法分辨它是否已配置或沒有。兩者都完全獨立,但「蚊子」並沒有顯示任何關於橋樑的信息。我有點困惑。 – avelampudi