bytehala / android-mqtt-quickstart

Android Studio port of the Eclipse paho MQTT sample project.
151 stars 62 forks source link

Failed to push messages in loop with QOS=2 #7

Closed Rohitsachdeva closed 3 years ago

Rohitsachdeva commented 3 years ago

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.

Rohitsachdeva commented 3 years ago

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.