From ef5b56e97ac8a455778f33de3c6d5d58221b95a3 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 24 Sep 2023 21:42:22 +0200 Subject: [PATCH] feat: The position of the last seen messages is stored on a revoke --- .../kafka/chat/backend/implementation/kafka/DataChannel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java index c13f713e..2c3e60aa 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java @@ -169,6 +169,7 @@ public class DataChannel implements Runnable, ConsumerRebalanceListener { int partition = topicPartition.partition(); isShardOwned[partition] = false; + nextOffset[partition] = consumer.position(topicPartition); log.info("Partition revoked: {} - next={}", partition, nextOffset[partition]); infoChannel.sendShardRevokedEvent(partition); }); -- 2.20.1