[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] MqttAsyncClient - inflight message limit
|
and one other enhancement that is on the
wish list is to add a buffer capability that can accept and store messages
when connectivity is not available but would also handle the case where
the "in-flight" window is maxed out,.
All the best
Dave
From:
Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>
To:
paho-dev@xxxxxxxxxxx
Date:
26/01/2015 12:58
Subject:
Re: [paho-dev]
MqttAsyncClient - inflight message limit
Sent by:
paho-dev-bounces@xxxxxxxxxxx
Hi Davy,
1) You can set a callback on the publish method, which will be called when
each publish has completed. This way you can count how many messages
are in flight and delay the call to publish.
2) We also have an enhancement currently under review which allows the
application to set the maximum number of inflight messages allowed.
I hadn't got to reviewing it yet -- I hope to do so this week or next.
Ian
On 01/26/2015 11:07 AM, Davy De Waele wrote:
Hi,
I started implementing a solution based on the java MqttAsyncClient
since I needed to obtain the IMqttToken for message bookkeeping due to
some limitiations with the syncClient.
However I noticed the following :
When sending a substantial number of msgs in a short timestamp,
the risk of running into the max inflight messages is very high (writing
a loop that sends 20 msgs to a topic results in "Too many publishes
in progress (32202)" about half of the time.
This is not the case with the syncClient because you allow
for some time for the message to get sent before moving on to the next
one.
How should we handle this ? Our broker is perfectly capable
of handling this type of load, but here it seems that the client is the
bottleneck.
Should the asyncClient always be used by specifying a
waitForCompletion on the mqttDeliveryToken to avoid having too
much inflight messages in the client ?
mqttDeliveryToken.waitForCompletion(200);
Regards,
Davy
_______________________________________________
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
--
Ian Craggs
icraggs@xxxxxxxxxx
IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
_______________________________________________
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