Skip to content

Commit

Permalink
Removed unnecessary flush in sync Send() operation (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Apr 20, 2020
1 parent a575681 commit 23d4808
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,6 @@ func (p *partitionProducer) Send(ctx context.Context, msg *ProducerMessage) (Mes
wg.Done()
}, true)

// When sending synchronously we flush immediately to avoid
// the increased latency and reduced throughput of batching
if err = p.Flush(); err != nil {
return nil, err
}

wg.Wait()
return msgID, err
}
Expand Down

0 comments on commit 23d4808

Please sign in to comment.