From: Kai Moritz Date: Sun, 24 Sep 2023 19:42:22 +0000 (+0200) Subject: feat: The position of the last seen messages is stored on a revoke X-Git-Tag: rebase--2024-01-27--15-10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ea2a9baff4353f83bb6f07bb788b1a0f051e5177;p=demos%2Fkafka%2Fchat feat: The position of the last seen messages is stored on a revoke --- 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); });