From 55f98d51114c630477e2f8c62738c34005a1f8d1 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sat, 2 Jan 2016 12:41:14 -0500 Subject: [PATCH] Upstream has spoken on retriable errors Add InvalidMessage, and re-order the others to match their definition order. --- async_producer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async_producer.go b/async_producer.go index 44c0abfee..7812ebcb0 100644 --- a/async_producer.go +++ b/async_producer.go @@ -725,7 +725,7 @@ func (bp *brokerProducer) handleSuccess(sent *produceSet, response *ProduceRespo } bp.parent.returnSuccesses(msgs) // Retriable errors - case ErrUnknownTopicOrPartition, ErrNotLeaderForPartition, ErrLeaderNotAvailable, + case ErrInvalidMessage, ErrUnknownTopicOrPartition, ErrLeaderNotAvailable, ErrNotLeaderForPartition, ErrRequestTimedOut, ErrNotEnoughReplicas, ErrNotEnoughReplicasAfterAppend: Logger.Printf("producer/broker/%d state change to [retrying] on %s/%d because %v\n", bp.broker.ID(), topic, partition, block.Err)