Change internals of BufferedProducer

This commit is contained in:
Matias Fontanini
2017-04-23 11:01:21 -07:00
parent dbb547889b
commit e7db3df966
3 changed files with 82 additions and 33 deletions

View File

@@ -86,4 +86,13 @@ int Producer::poll(milliseconds timeout) {
return rd_kafka_poll(get_handle(), timeout.count());
}
void Producer::flush() {
flush(get_timeout());
}
void Producer::flush(milliseconds timeout) {
auto result = rd_kafka_flush(get_handle(), timeout.count());
check_error(result);
}
} // cppkafka