From 05fc38bea61e7cddf93b436cad96542a1e42f456 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 28 Oct 2024 10:49:26 +0100 Subject: [PATCH] =?utf8?q?Log-Meldungen=20zum=20Fortschritt=20beim=20Verse?= =?utf8?q?nden=20des=20Z=C3=A4hler-Status=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/de/juplo/kafka/ExampleConsumer.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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]); } }); -- 2.20.1