客户端连接emqx一段时间后,链接断开,导致数据丢失。请问如何处理?

客户端报错如下:
2024-08-26 15:06:51 [MQTT Snd: 513f30541122_8fcb10058408_MTI3LjAuMS4x] ERROR c.e.i.c.m.h.m.MqttClientCallback[connectionLost:37]-Mqtt连接丢失(客户端Id=513f30541122_8fcb10058408_MTI3LjAuMS4x) org.eclipse.paho.client.mqttv3.MqttException: Connection lost at org.eclipse.paho.client.mqttv3.internal.CommsSender.handleRunException(CommsSender.java:194) at org.eclipse.paho.client.mqttv3.internal.CommsSender.run(CommsSender.java:171) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.net.SocketException: Connection reset by peer (Write failed) at java.base/java.net.SocketOutputStream.socketWrite0(Native Method) at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110) at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150) at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81) at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142) at org.eclipse.paho.client.mqttv3.internal.wire.MqttOutputStream.flush(MqttOutputStream.java:49) at org.eclipse.paho.client.mqttv3.internal.CommsSender.run(CommsSender.java:149) ... 1 common frames omitted
emqx管理页面报警如下:

从客户端 SDK 包的日志看链接是被服务器侧断开了(可能是 EMQX 也可能是中间的 LB 等等)

从看 EMQX 的日志看,是这个客户端的 Socket 堆积了太多的消息发布出去了。

建议是先看看这个客户端订阅了那些主题,这些主题估计有多大的消息 TPS 和流量吞吐,客户端是否处理得过来。

100来个设备,3秒采一次,每个设备平均10个属性。如何增加客户端的消费能力?