eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.11k stars 881 forks source link

Enhancement Request: Option to set the order of offline messages and more #327

Open asutoshg opened 7 years ago

asutoshg commented 7 years ago

Please fill out the form below before submitting, thank you!

If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new

Presently delivery of offline messages takes place in the order it was produced and only single buffer of max size 5000 msg is supported. In situations where data rate is high and network is down for prolonged duration, there is a possibility of loss of data due to small size and number of offline buffer. Also, after connectivity is restored it may take quite a long time to clear the backlog. In application where latest data is of higher relevance, the application will have to wait many more minutes, even after connectivity is restored, before it starts seeing useful data.

I would like to have following enhancements to support my use case:

Thanks

jpwsutton commented 7 years ago

Thanks for the enhancement request @asutoshg

asutoshg commented 7 years ago

Thanks for our response @jpwsutton Many smaller sized buffers would give me flexibility to choose which one to publish ,expunge ,archive Also, time to clear small buffer would be less compared time taken to clear one large buffer (be it FIFO or LIFO). In order to accommodate more messages multiple such buffers will be required, just in case the network is down for prolonged duration.

shaikhrahil commented 6 years ago

@jpwsutton would there be a python wrapper for the max offline buffer size?

olad32 commented 6 years ago

I agree, the ability to have multiple buffers would allow to prioritize different types of messages.