Hi Bhaskar,

Comment inline.

On Sun, Aug 27, 2017 at 12:37 PM, Bhaskar Gollapudi <
bhaskargollap...@gmail.com> wrote:

> max.in.flight.requests.per.connection The maximum number of unacknowledged
> requests the client will send on a single connection before blocking. Note
> that if this setting is set to be greater than 1 and there are failed
> sends, there is a risk of message re-ordering due to retries (i.e., if
> retries are enabled).
> I think this documentation is a bit confusing as it say this controls the #
> of unack'd requests client can send before being blocked. However , AFAI
> checked the code, it only checks for pending writes to the socketChannel
> before allowing next write, and this write might have been buffered in the
> socket's internal buffers (  based on SO_SNDBUF
> <https://docs.oracle.com/javase/8/docs/api/java/net/
> StandardSocketOptions.html#SO_SNDBUF>
> value
> ) without any ack as yet. There is still a chance that this message might
> get lost ( network failure and session loss ) so its not correct to equate
> this state to saying the  message has been acked.
>

There is more to it than that. Sender has a guaranteeMessageOrder parameter
that is set to true if max.in.flight.requests.per.connection is 1.

Ismael

Reply via email to