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

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


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.


Johnny Ren.

This email has been processed by SmoothZap -
paho-dev mailing list

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