Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] maxInflight window size in ClientState

Hi Dave,

I just double checked the number of the pending message in flight, it appears even after the messages has already been sent to mqtt broker, it won't be removed from the pending message list right away.

It is only been removed then actuallyInflight meet the maxInflight OR after a certain amount of time.  However, when it meets the maxInflight, it will pop out "too many publishes in progress", then undo the sending action to mqtt broker, which results in message lost.


Can you give me some advices how to deal with this?

Thanks !!




Regards,
 
Jianing Ren
Software Developer
 





 
p: +61 2 9281 0444
mobile: +61 (0)488037723
a: ADTEC Communications. Suite13, 89-97 Jones street, Ultimo NSW Australia 2007
ADTEC Communications is a 100% Australian owned critical communications, voice, video and data conferencing specialist.
This e-mail may contain confidential information. If you are not the intended recipient do not keep, forward, use, save or reply to this communication




On 27/11/2013, at 7:47 PM, Dave Locke <locke@xxxxxxxxxx> wrote:

There is no external API to change the max inflight window today, this was discussed on a recent thread along with the idea of a buffered client.  A buffered client would enable messages to be sent when there is no connectivity up to a maximum configurable amount.  This is a reasonable amount of work to implement.   In the meantime there is no reason not to make the max inflight window configurable - would be handy if you can raise a bug on the Paho bugzilla so that it can be tracked.  The inflight window effects how messages can be delivered in parallel from the client to the server.  The bigger the window the more state needs to be stored in the client.  It will also be useful for devices that are more constrained and only wish to allow 1 or a small amount of messages to be inflight.

Even without changes there are approaches to manage the delivery of messages. For instance:
  • Blocking mode: Send a message and wait for it to be delivered - typical approach for this is to use the waitForCompletion() method on the token returned from the publish call
  • Keep a count of messages in flight and block when at the limit and release when a delivery completion is notified.

All the best
Dave

 



From:        Jianing Ren <jianingr@xxxxxxxxxxxx>
To:        "paho-dev@xxxxxxxxxxx" <paho-dev@xxxxxxxxxxx>
Date:        27/11/2013 02:04
Subject:        [paho-dev] maxInflight window size in ClientState
Sent by:        paho-dev-bounces@xxxxxxxxxxx




Hi,Paho  people,


I am wandering if I can set this maxInflight  value in ClientState to a great number, lets say, 10000? If I do so, does it have any side effect?

Because I have an issue when a large amount of messages publishes at the same time, I will fail to send out from the 11th one, as the default maxInflight value was 10.


Thanks in advance,guys.

Much appreciated.


Regards,


Johnny Ren.






This email has been processed by SmoothZap -
www.smoothwall.net
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
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
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev



This email has been processed by SmoothZap - www.smoothwall.net


Back to the top