Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] [Android Client] Offline messages going in random order

Hello,
We are using the MqttAndroidClient in our Android app with offline buffer options as following. 
We noticed that the messages published (qos: 1) when the app is offline are sent in a random order when the app comes back online. So if A, B, C, D are published to paho, they might be sent in D, B, A, C

We tried with setMaxInflightOptions(1), but in that case the offline messages are never sent at all.  

Is there a way to make the offline messages go in order?

Paho android and java version:  1.1.1-SNAPSHOT

MqttConnectOptions connOptions = new MqttConnectOptions();
connOptions.setAutomaticReconnect(true);
connOptions.setCleanSession(false);
connOptions.setMaxInflight(200);

DisconnectedBufferOptions disconnectedBufferOptions = new DisconnectedBufferOptions();
disconnectedBufferOptions.setBufferEnabled(true);
disconnectedBufferOptions.setBufferSize(1000);
disconnectedBufferOptions.setPersistBuffer(true);
disconnectedBufferOptions.setDeleteOldestMessages(false);

Thanks,
Satyadeep
--
Regards,
Satyadeep

Back to the top