Expand description of BufferedProducer

This commit is contained in:
Matias Fontanini
2017-04-23 14:12:00 -07:00
parent aab182c4ea
commit b5a7c70993

View File

@@ -24,6 +24,9 @@ namespace cppkafka {
* produced messages (either in a buffer or non buffered way) are acknowledged by the kafka * produced messages (either in a buffer or non buffered way) are acknowledged by the kafka
* brokers. * brokers.
* *
* When producing messages, this class will handle cases where the producer's queue is full so it\
* will poll until the production is successful.
*
* This class is not thread safe. * This class is not thread safe.
*/ */
template <typename BufferType> template <typename BufferType>
@@ -167,7 +170,7 @@ void BufferedProducer<BufferType>::flush() {
template <typename BufferType> template <typename BufferType>
void BufferedProducer<BufferType>::wait_for_acks() { void BufferedProducer<BufferType>::wait_for_acks() {
messages_acked_ = 0; messages_acked_ = 0;
while (messages_acked_ != expected_acks_) { while (messages_acked_ < expected_acks_) {
try { try {
producer_.flush(); producer_.flush();
} }