瀏覽代碼

Upstream has spoken on retriable errors

Add InvalidMessage, and re-order the others to match their definition order.
Evan Huus 10 年之前
父節點
當前提交
55f98d5111
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)
 			bp.parent.returnSuccesses(msgs)
 		// Retriable errors
 		// Retriable errors
-		case ErrUnknownTopicOrPartition, ErrNotLeaderForPartition, ErrLeaderNotAvailable,
+		case ErrInvalidMessage, ErrUnknownTopicOrPartition, ErrLeaderNotAvailable, ErrNotLeaderForPartition,
 			ErrRequestTimedOut, ErrNotEnoughReplicas, ErrNotEnoughReplicasAfterAppend:
 			ErrRequestTimedOut, ErrNotEnoughReplicas, ErrNotEnoughReplicasAfterAppend:
 			Logger.Printf("producer/broker/%d state change to [retrying] on %s/%d because %v\n",
 			Logger.Printf("producer/broker/%d state change to [retrying] on %s/%d because %v\n",
 				bp.broker.ID(), topic, partition, block.Err)
 				bp.broker.ID(), topic, partition, block.Err)