It would. The way we see things is that if retrying has a chance of success, we will retry. Duplicates are basically unavoidable, because the producer can't always know if the leader received the message or not. So we expect the consumers to de-duplicate messages.
Gwen On Thu, Feb 12, 2015 at 7:05 AM, Evan Huus <evan.h...@shopify.com> wrote: > If a producer produces a request with RequiredAcks of -1 (wait for all > ISRs), and the broker returns a RequestTimedOut error, are the messages > still committed locally on the leader broker? The protocol states "we will > not terminate a local write" which implies to me that even when > RequestTimedOut is returned, the producer can basically assume delayed > success (except perhaps in the case of an immediate broker failure). > > However I see in the code that TimeoutException extends RetriableException, > which means (if I understand correctly) that the producer will retry the > request in this case. Wouldn't this lead to duplicate messages? > > Thanks, > Evan >