Skip to main content

[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

Phone: 01962 815438 | Extension: x372454
E-mail: 
Personal Website: www.jsutton.co.uk
Find me on:      
IBM

Hursley Park
HursleySO212JN
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
--
Regards,
Satyadeep
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
 
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


Back to the top