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=091aa56bd21233ba43952c02e19e6661af0b8f4d;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 6d72456..f4cad5c 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -188,7 +188,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]); } });