Error: Too many publishes in progress
See original GitHub issueWhen the tb-gateway (GW) loses the connection with the server for a period of time such that (I suspect) the number of messages not transmitted are greater than the “maxInFlight” parameter, then the connection is re-established the GW generate this error in the log:
2017-05-10 00:11:07,311 [MQTT Call: 452a5e28-9587-47bd-a61f-6d03124f6b21] WARN o.t.g.service.MqttGatewayService - [Sensor_Verde][1370] Failed to publish device telemetry!
org.eclipse.paho.client.mqttv3.MqttException: Too many publishes in progress
at org.eclipse.paho.client.mqttv3.internal.ClientState.send(ClientState.java:498)
at org.eclipse.paho.client.mqttv3.internal.ClientComms.internalSend(ClientComms.java:136)
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:165)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1126)
at org.thingsboard.gateway.service.MqttGatewayService.publishAsync(MqttGatewayService.java:334)
at org.thingsboard.gateway.service.MqttGatewayService.onDeviceTelemetry(MqttGatewayService.java:198)
at org.thingsboard.gateway.extensions.mqtt.client.MqttBrokerMonitor.onDeviceData(MqttBrokerMonitor.java:181)
at org.thingsboard.gateway.extensions.mqtt.client.listener.MqttTelemetryMessageListener.messageArrived(MqttTelemetryMessageListener.java:42)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:469)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:380)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:184)
at java.lang.Thread.run(Thread.java:745)
and in the server-side user interface Device telemetry data does not arrive.
Restart the tb-gateway service does not fix anything. The only way I found to fix the problem is to delete the GW and create it again in the Thingsboard console user interface, which has the effect of losing all historical data.
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (3 by maintainers)
Top Results From Across the Web
mqtt exception Too many publishes in progress (32202)
You have to set an higher MaxInflight value by using setMaxInflight() method from the MqttConnectOptions object before connecting to the broker.
Read more >Too many publishes is in progress with QOS 1 #551 - GitHub
Hi All, i set to maxInflight messages property to 1000 and trying to publish messages with 300 TPS, But after some point(after submiting...
Read more >Too many publishes in progress Error - Google Groups
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group. To unsubscribe from this group and stop receiving emails ......
Read more >MQTT error Too many publishes in progress - TIBCO Support
Using QoS=0 loses messages at high publish rates.
Read more >[paho-dev] Java mqtt "too many publishes in progress" issue.
Our project is currently use java mqtt broker, the issue now was when the server-----producing application (publisher) ,publishes the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Components: TB Gateway (v1.2.1) and a TB Server (v1.3.1).
I was doing some network captures with Tcpdump and I can see that of the 3 different types of MQTT PUBLISH (to topics: “v1/devices/me/telemetry”, “v1/gateway/attributes” and “v1/gateway/telemetry”) that the gateway makes to the TB Server only those made to the topic “v1/gateway/attributes” are acknowledged (Publish Ack). This agrees that in the storage folder I can see all the messages ID (s-xx.msg) of the unacknowledged messages and all correspond to the unacknowledged topics I saw in the network capture too, and any correspond to attributes message.
So, in other words, apparently only the messages of attributes (“v1/gateway/attributes”) are being acknowledged from the TB Server, but not those of telemetry (“v1/devices/me/telemetry” and “v1/gateway/telemetry”) and are those that end up filling the storage.
This was partially fixed in thingsboard-gateway releases 1.2.2 and 1.4.0. Fixed in master branch