mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 02:57:53 +00:00
Use tags on EOF and timeout callbacks on ConsumerDispatcher
This commit is contained in:
@@ -39,7 +39,7 @@ ConsumerRunner::ConsumerRunner(Consumer& consumer, size_t expected, size_t parti
|
||||
}
|
||||
},
|
||||
// EOF callback
|
||||
[&](const TopicPartition& topic_partition) {
|
||||
[&](ConsumerDispatcher::EndOfFile, const TopicPartition& topic_partition) {
|
||||
if (number_eofs != partitions) {
|
||||
number_eofs++;
|
||||
if (number_eofs == partitions) {
|
||||
@@ -50,7 +50,7 @@ ConsumerRunner::ConsumerRunner(Consumer& consumer, size_t expected, size_t parti
|
||||
}
|
||||
},
|
||||
// Timeout callback
|
||||
[&]() {
|
||||
[&](ConsumerDispatcher::Timeout) {
|
||||
if (expected > 0 && messages_.size() == expected) {
|
||||
dispatcher.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user