ActiveMq 和蚊子桥不工作

ActiveMq and mosquitto bridge not working

当我尝试从 mosquitto 连接到 activemq 时,activemq 控制台出现以下错误。

WARN | Transport Connection to: tcp://192.168.0.27:48689 failed: java.io.IOException: Unknown data type: 77

我的设置如下 192.168.0.27 ---- 具有以下桥接配置的 Mosquitto 代理

connection try
try_private false
address 192.168.0.22:61616
username myuser
password mypassword
start_type automatic
clientid 1
notifications true
topic inbound/# in alpha/ beta/
topic outbound/# out harry/ larry

我的 ActiveMQ 代理是 192.168.0.22,TansportConnector 如下

<transportConnectors>
        <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
    </transportConnectors>

这将不起作用,因为代理上的连接器被创建为仅适用于 OpenWire 客户端的 OpenWire 连接器。您需要向代理添加 MQTT 连接器:

<transportConnectors>
    <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
</transportConnectors>

然后您可以配置其他 MQTT 资源以连接到那里。