Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] DEFAULT_MAX_INFLIGHT?

Owen,

you can change this value by calling getMaxInflight() of MqttConnectOptions. Also, you can control the number of messages that are currently inflight vía a counter that is increased when publish() is called and decreased when deliveryComplete() callback is executed. Using this counter you can avoid the REASON_CODE_MAX_INFLIGHT exception.

Regards.

2015-09-23 4:54 GMT+02:00 Owen Davis <owendavis@xxxxxxxxx>:
Hi, I was doing some testing with the Paho java client library and when I sent a lot of messages (especially at QoS 1 which requires an ack) I started getting exceptions thrown for REASON_CODE_MAX_INFLIGHT. It looks like the default is hardcoded to be 10 here:


My shallow understanding of how the client works is that if you have a persistent message, it’s stored (in memory or disk) but it also seems to be checking this limit first, which seems to mean that the maximum number of stored/buffered messages is 10, no matter what persistent backing store you are using?

I could hack the client library code to fix that limit, but it still seems very low to me. The use case is a device where the network might be down for minutes or hours at a time, and the client persistence feature is great and all, but that’s really not much of a buffer. I feel like that’s actually a bug.

I could patch the code, but maybe it should be configurable? Or removed entirely if you’re using file based persistence?

Should I file a bug and submit a patch?

_______________________________________________
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



--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com

Back to the top