We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b98dd45 + 2781342 commit 966ddd3Copy full SHA for 966ddd3
1 file changed
src/framework/KafkaManager.cpp
@@ -118,6 +118,10 @@ namespace OpenWifi {
118
Producer.poll((std::chrono::milliseconds) 0);
119
}
120
121
+ if (Queue_.size() == 0) {
122
+ // message queue is empty, flush all previously sent messages
123
+ Producer.flush();
124
+ }
125
} catch (const cppkafka::HandleException &E) {
126
poco_warning(Logger_,
127
fmt::format("Caught a Kafka exception (producer): {}", E.what()));
@@ -126,10 +130,6 @@ namespace OpenWifi {
130
} catch (...) {
131
poco_error(Logger_, "std::exception");
128
132
129
- if (Queue_.size() == 0) {
- // message queue is empty, flush all previously sent messages
- Producer.flush();
- }
133
Note = Queue_.waitDequeueNotification();
134
135
Producer.flush();
0 commit comments