我已经在两台不同的服务器上安装了 VerneMQ 和 Mosquitto,我正在尝试从 Mosquitto 服务器发送测试消息,以查看它们是否在 VerneMQ 服务器上收到。为简单起见,我们称它们为:VerneMQ - S1 Mosquitto - S2
在 S1 上:
[user1t@s1 ]# netstat -tupln | grep 1883
tcp 0 0 10.0.0.1:1883 0.0.0.0:* LISTEN 13669/beam.smp
S1,VerneMQ 的配置应该允许任何连接:
[user1@s1 ]# cat /etc/vernemq/vernemq.conf | grep ano
## Allow anonymous users to connect, default is 'off'. !!NOTE!!
allow_anonymous = on
vernemq ping
Last login: Mon May 25 10:51:12 UTC 2020 on pts/2
pong
从 S2
[user1@s2 ]# mosquitto_pub -h 10.0.0.1 -p 1883 -m "message1" -t "topic1" -d
Client mosq-wodJ1DYaw8yqeFMY95 sending CONNECT
Client mosq-wodJ1DYaw8yqeFMY95 received CONNACK (0)
Client mosq-wodJ1DYaw8yqeFMY95 sending PUBLISH (d0, q0, r0, m1, 'topic1', ... (8 bytes))
Client mosq-wodJ1DYaw8yqeFMY95 sending DISCONNECT
如何检查消息是否在另一台机器上收到。运行 vmq-admin session show 不提供任何输出
[user1@s1 ]# vmq-admin session show
Last login: Mon May 25 11:04:02 UTC 2020 on pts/2
日志中是否有我可以看到正在处理的消息的位置?