Skip to content

Commit 23d4808

Browse files
authored
Removed unnecessary flush in sync Send() operation (apache#230)
1 parent a575681 commit 23d4808

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pulsar/producer_partition.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,6 @@ func (p *partitionProducer) Send(ctx context.Context, msg *ProducerMessage) (Mes
357357
wg.Done()
358358
}, true)
359359

360-
// When sending synchronously we flush immediately to avoid
361-
// the increased latency and reduced throughput of batching
362-
if err = p.Flush(); err != nil {
363-
return nil, err
364-
}
365-
366360
wg.Wait()
367361
return msgID, err
368362
}

0 commit comments

Comments
 (0)