Hot fix polling

This commit is contained in:
German Osin 2020-12-14 13:08:57 +03:00
parent f5ed4a4d1b
commit 29887cb4e0

View file

@ -104,7 +104,7 @@ public class ConsumingService {
while (!sink.isCancelled()) {
ConsumerRecords<Bytes, Bytes> records = consumer.poll(POLL_TIMEOUT_MS);
log.info("{} records polled", records.count());
if (records.count() == 0 && emptyPollsCount < MAX_EMPTY_POLLS_COUNT) {
if (records.count() == 0 && emptyPollsCount > MAX_EMPTY_POLLS_COUNT) {
break;
} else {
emptyPollsCount++;