Paho: MqttAsyncClient.getInFlightMessageCount() is sometimes over 100

54 Views Asked by At

I am using the the version 1.2.5 of the mqtt5 paho java Client and sending Messages with QoS1 - the inflight message count is normally a low single digit. Is that more a problem of the client or the Broker(using mosquitto) not able to manage the workload?

the mosquitto.conf looks like that

max_inflight_bytes 0
max_inflight_messages 0
retain_available true
listener 1883 0.0.0.0
allow_anonymous true

sometimes the publish method, altough I am using the async-Client, is blocking for seconds or in rare case even over a minute.

1

There are 1 best solutions below

0
hardillb On

Since QOS 1 is a 2 step process

  1. Client sends message to the broker
  2. Broker sends acknowledgement it's received the message

A growing number of inflight messages would imply that it's the broker that is being slow to respond.

With the information available in the question that is probably about the only answer possible to give.