Java连接mqtt 容易连接丢失

环境信息

  • EMQX 版本:4.3.1
  • 操作系统及版本:
  • 其他

问题描述

经常连接丢失

配置文件及日志

2022-06-28T10:59:04.728932+08:00 [error] 000000000000@10.220.121.29:42156 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.730350+08:00 [error] 10.222.164.188:55242 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729019+08:00 [error] 000000000000@10.227.214.173:38882 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729403+08:00 [error] 10.107.137.189:34856 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.730414+08:00 [error] 10.203.191.164:56804 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729086+08:00 [error] 000000000000@10.163.192.244:48272 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729479+08:00 [error] 10.101.253.111:57670 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.730475+08:00 [error] 10.243.66.92:36057 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729548+08:00 [error] 10.161.63.158:43212 [WebHook] HTTP request error: normal
2022-06-28T10:59:04.729220+08:00 [error] 000000000000@10.240.82.29:51347 [WebHook] HTTP request error: normal

[warning] FCMSYSTEM@10.21.5.28:59192 [Channel] Dropped the qos2 packet 5037 due to awaiting_rel is full

[warning] FCMSYSTEM@10.21.5.28:60396 [Channel] The PUBREL PacketId 3184 is not found

看贴上来的日志 是没有连接丢失的情况?
开下日志追踪下这个客户端看看 https://www.emqx.io/docs/zh/v4.4/modules/tracer.html#追踪指定-clientid

间断性的断开连接


主题监控里面也有大量消息丢失

没有这个东西啊…

这个是在4.4 文档连接上,这个功能在新版本中有,4.3.1上还未该功能。你这个问题感觉像是消费能力不足导致,和你http 服务性能不够导致的。建议选择企业版桥接到Kafka中,这样高并发消费消息性能能解决

https://www.emqx.io/docs/zh/v4.4/getting-started/log.html
之前发成企业版的文档了。。这个是开源版的文档可以看看。