From cb7157fa339b70031db15cc4ad6c2ea1c73a321b 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 5680360f..60d0705c 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