Explorar o código

Upstream has spoken on retriable errors

Add InvalidMessage, and re-order the others to match their definition order.
Evan Huus %!s(int64=10) %!d(string=hai) anos
pai
achega
55f98d5111
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      async_producer.go

+ 1 - 1
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)