From 242f7661171468a4898d6c36de367136e75b8bb9 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 5485e4ef..03eaabf8 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 @@ -164,6 +164,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