bytehala/android-mqtt-quickstart

Failed to push messages in loop with QOS=2

Closed this issue · 1 comments

i tried to publish message in loop to check load on broker. but only 20 messages pushed successfully when pushed 100 messages.

But working fine while sending with QOS = 0 ; i tried 2000 messages, that was working fine and delivered all messages.

Fixed by using following

You have to set an higher MaxInflight value by using

setMaxInflight()

method from the MqttConnectOptions object before connecting to the broker.

The default value is set to 10.