Skip to content

Commit

Permalink
dont clear message before logging
Browse files Browse the repository at this point in the history
  • Loading branch information
richardartoul committed Jul 20, 2024
1 parent b73a5f2 commit 0222838
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions async_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,6 @@ func (p *asyncProducer) returnError(msg *ProducerMessage, err error) {
p.bumpIdempotentProducerEpoch()
}

msg.clear()
pErr := &ProducerError{Msg: msg, Err: err}
if p.conf.Producer.Return.Errors {
p.errors <- pErr
Expand All @@ -1455,7 +1454,6 @@ func (p *asyncProducer) returnErrors(batch []*ProducerMessage, err error) {
func (p *asyncProducer) returnSuccesses(batch []*ProducerMessage) {
for _, msg := range batch {
if p.conf.Producer.Return.Successes {
msg.clear()
p.successes <- msg
}
p.inFlight.Done()
Expand Down

0 comments on commit 0222838

Please sign in to comment.