From 46fe7f9d9ca43ea449cfe47ca88489d2a9459b7a Mon Sep 17 00:00:00 2001 From: le-linh <48096349+le-linh@users.noreply.github.com> Date: Thu, 28 Feb 2019 10:30:10 -0500 Subject: [PATCH] Make NotEnoughReplicasError/NotEnoughReplicasAfterAppendError retriable According to kafka docs, both are supposed to be retriable errors, so this fix is to resolve that See issue #1580 --- kafka/errors.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kafka/errors.py b/kafka/errors.py index 118e4302b..f13f97853 100644 --- a/kafka/errors.py +++ b/kafka/errors.py @@ -268,6 +268,7 @@ class NotEnoughReplicasError(BrokerResponseError): description = ('Returned from a produce request when the number of in-sync' ' replicas is lower than the configured minimum and' ' requiredAcks is -1.') + retriable = True class NotEnoughReplicasAfterAppendError(BrokerResponseError): @@ -276,6 +277,7 @@ class NotEnoughReplicasAfterAppendError(BrokerResponseError): description = ('Returned from a produce request when the message was' ' written to the log, but with fewer in-sync replicas than' ' required.') + retriable = True class InvalidRequiredAcksError(BrokerResponseError):