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-02-20--10-29~23 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ef5b56e97ac8a455778f33de3c6d5d58221b95a3;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 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); });