From: Kai Moritz Date: Mon, 28 Oct 2024 09:49:26 +0000 (+0100) Subject: Log-Meldungen zum Fortschritt beim Versenden des Zähler-Status ergänzt X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=05fc38bea61e7cddf93b436cad96542a1e42f456;p=demos%2Fkafka%2Ftraining Log-Meldungen zum Fortschritt beim Versenden des Zähler-Status ergänzt --- diff --git a/src/main/java/de/juplo/kafka/ExampleConsumer.java b/src/main/java/de/juplo/kafka/ExampleConsumer.java index 27a1bba..9dafb18 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -196,7 +196,24 @@ public class ExampleConsumer implements Runnable, ConsumerRebalanceListener acked[partition]++; if (done[partition] && !(acked[partition] < seen[partition])) { - phaser.arrive(); + int arrivedPhase = phaser.arrive(); + log.debug( + "{} - Arrived at phase {} for partition {}, seen={}, acked={}", + id, + arrivedPhase, + partition, + seen[partition], + acked[partition]); + } + else + { + log.debug( + "{} - Still in phase {} for partition {}, seen={}, acked={}", + id, + phaser.getPhase(), + partition, + seen[partition], + acked[partition]); } });