You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Henry Cai <hc...@pinterest.com.INVALID> on 2017/03/28 23:17:16 UTC

Achieve message ordering through Async Producer

If I use kafka's AsyncProducer, would I still be able to achieve message
ordering within the same partition?  When the first message failed to send
to broker, will the second message (within the same kafka partition) being
sent out ahead of first message?

Based on this email thread, it seems AsyncProducer can maintain ordering
even on sent-failure situation:

https://groups.google.com/forum/#!topic/kafka-clients/lWlRRc5JNmg

Re: Achieve message ordering through Async Producer

Posted by Henry Cai <hc...@pinterest.com.INVALID>.
Based on kafka doc, this parameter should maintain the message ordering:

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).

On Tue, Mar 28, 2017 at 4:17 PM, Henry Cai <hc...@pinterest.com> wrote:

> If I use kafka's AsyncProducer, would I still be able to achieve message
> ordering within the same partition?  When the first message failed to send
> to broker, will the second message (within the same kafka partition) being
> sent out ahead of first message?
>
> Based on this email thread, it seems AsyncProducer can maintain ordering
> even on sent-failure situation:
>
> https://groups.google.com/forum/#!topic/kafka-clients/lWlRRc5JNmg
>
>