[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] [Android Client] Offline messages going in random order
|
Hi Satyadeep,
That's odd, the disconnected message buffer is a FIFO buffer, so there should be no change in the order in which messages are sent. Keep in mind that if you want to limit inflight messages to 1, you will also need to set this on the broker as well as the client.
If the max inflight messages value is the default though, there is no way to guarantee in order delivery with QoS 1. Are you able to replicate this behaviour?
Kind regards,
James Sutton Software Engineer - IoT Foundation - MQTT Open Source Projects Ops Team - Wimbledon Project |
|
| Hursley Park Hursley, SO212JN United Kingdom |
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
----- Original message -----
From: Satyadeep <satyadeep.1991@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Cc:
Subject: [paho-dev] [Android Client] Offline messages going in random order
Date: Tue, Nov 1, 2016 2:23 PM
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
--
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU