spring boot中使用org.eclipse.paho.client.mqttv3频繁断开,EMQX是docker版安装的,5.7版本,基本启动连接1分钟就断开连接了,断开后重连,有时候连上马上就断开了,几个项目的情况都是这样的,请帮忙解决:
mqtt:
username: #
password: #
url: tcp://$(hostIp}:1883
clientid: ${random.value}
default-topic: test
timeout: 30
keepalive: 60000
subscribeFlag: true
以下是emqx打印的日志信息,说是socket关闭,不知道咋回事
2024-10-30T16:01:50.580144+00:00 [RULE_SQL_EXEC] 1111111111111@27.47.131.234:4555 msg: rule_activated, environment: , input: [clientid: 1111111111111, disconn_props: [User-Property: ], disconnected_at: 1730304110580, event: client.disconnected, node: emqx@172.17.0.2, peername: 27.47.131.234:4555, proto_name: MQTT, proto_ver: 4, reason: tcp_closed, sockname: 172.17.0.2:1883, timestamp: 1730304110580, username: oxygen001], rule_id: devicestate_WH_D, rule_trigger_ts: [1730304110580], username: oxygen001
2024-10-30T16:01:50.580230+00:00 [RULE_SQL_EXEC] 1111111111111@27.47.131.234:4555 msg: SQL_yielded_result, result: [clientid: 1111111111111, disconn_props: [User-Property: ], disconnected_at: 1730304110580, event: client.disconnected, metadata: [rule_id: devicestate_WH_D], node: emqx@172.17.0.2, peername: 27.47.131.234:4555, proto_name: MQTT, proto_ver: 4, reason: tcp_closed, sockname: 172.17.0.2:1883, timestamp: 1730304110580, username: oxygen001], rule_id: devicestate_WH_D, rule_trigger_ts: [1730304110580], username: oxygen001