Skip to content

Commit 695a43b

Browse files
committed
Add flush to close method
1 parent ff8c16b commit 695a43b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/producer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class Producer
6161

6262
void close()
6363
{
64+
// Following
65+
// https://github.com/confluentinc/librdkafka/blob/master/INTRODUCTION.md#producer
66+
// and https://github.com/confluentinc/librdkafka/issues/1499
67+
producer->flush(60*1000);
6468
delete producer;
6569
}
6670

0 commit comments

Comments
 (0)