Browse Source

Don't propagate zero timestamp to ProducerMessage

yingnanliu 9 years ago
parent
commit
16a22e0995
1 changed files with 1 additions and 1 deletions
  1. 1 1
      async_producer.go

+ 1 - 1
async_producer.go

@@ -727,7 +727,7 @@ func (bp *brokerProducer) handleSuccess(sent *produceSet, response *ProduceRespo
 		switch block.Err {
 		// Success
 		case ErrNoError:
-			if bp.parent.conf.Version.IsAtLeast(V0_10_0_0) {
+			if bp.parent.conf.Version.IsAtLeast(V0_10_0_0) && !block.Timestamp.IsZero() {
 				for _, msg := range msgs {
 					msg.Timestamp = block.Timestamp
 				}