MQTT - Mosquitto Bridge不发送消息

时间:2015-09-11 03:50:07

标签: networking mqtt bridge paho

我有一个非常基本的双节点蚊子设置。其中一台机器在防火墙后面不接受传入连接,但我可以发送信息。我还没有实现SSL或ACL。试着保持这个简单的现在。无论如何,防火墙后面的机器正在从一些Pi获取消息,然后将其发送到本地代理。另一个本地应用程序通过websockets连接到该计算机。我需要将这些消息发布到防火墙外的另一个代理。

我看到防火墙经纪人连接到外部经纪人,但我无法看到任何消息。此外,我需要让防火墙后面的设备继续接收来自本地代理的消息。

以下是我的网络配置

connection bridge
address hostname-to-external-mqtt
topic both 0 #
bridge_attempt_unsubscribe false
local_clientid local
remote_clientid remote
start_type automatic
try_private false
cleansession true

以下是防火墙机器的详细输出,需要复制远程机器上的消息

mosquitto -c ./mosquitto.conf -v
1441942973: mosquitto version 1.4.2 (build date 2015-07-02 21:31:17-0400) starting
1441942973: Config loaded from ./mosquitto.conf.
1441942973: Opening ipv4 listen socket on port 1883.
1441942973: Opening ipv6 listen socket on port 1883.
1441942973: Opening websockets listen socket on port 9001.
1441942973: Bridge local doing local SUBSCRIBE on topic NODE-1/
1441942973: Connecting bridge bridge (remotehost:1883)
1441942973: Bridge remote sending CONNECT
1441942973: Received CONNACK on connection local.
1441942973: Bridge local sending SUBSCRIBE (Mid: 2, Topic: NODE-1/, QoS: 0)
1441942973: Received PUBACK from local (Mid: 1)
1441942973: Received SUBACK from local
1441942974: New connection from 192.168.1.18 on port 1883.
1441942974: New client connected from 192.168.1.18 as paho/AE8E0FF0F7A0180A22 (c1, k60).
1441942974: Sending CONNACK to paho/AE8E0FF0F7A0180A22 (0, 0)
1441942974: New connection from 192.168.1.3 on port 1883.
1441942974: New client connected from 192.168.1.3 as paho/9EE5A8894DD7E6EDC3 (c1, k60).
1441942974: Sending CONNACK to paho/9EE5A8894DD7E6EDC3 (0, 0)

以下是远程机器的详细输出

1441943193: New connection from firewalled-ip on port 1883.
1441943193: New client connected from firewalled-ip as local (c1, k60).
1441943193: Sending CONNACK to local (0, 0)
1441943193: Received PUBLISH from local (d0, q1, r1, m1, '$SYS/broker/connection/local/state', ... (1 bytes))
1441943193: Sending PUBACK to local (Mid: 1)
1441943194: Received SUBSCRIBE from local
1441943194:     NODE-1/ (QoS 0)
1441943194: local 0 NODE-1/
1441943194: Sending SUBACK to local

有人能帮我指出正确的方向吗?

0 个答案:

没有答案