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--15-07~33 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=a4e68e9998d1c0da34f78a8d4bc1cb10dcf345f4;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); });