eclipse-paho / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.14k stars 887 forks source link

Client stops working after subscribing to a topic with lots of retained messages #1044

Open gg-dim opened 3 months ago

gg-dim commented 3 months ago

We have a MQTT broker holding several thousands of topics with retained messages. If we try to connect and subscribe (wildcard) to a parent topic the paho client stops working. Depending on the length of the topic and the message and the network connection, the client stops working after a number of retained messages.

With Mosquitto MQTT broker somewhere in the internet it takes less than 2000 messages. With Mosquitto MQTT broker on localhost, less then 40000 messages.

I tried to find the cause, but ended up somewhere in the depths of the CommsReceiver.

gg-dim commented 3 months ago

It's a Mosquitto missconfiguration (max_queued_messages) and not paho issue.