1 package de.juplo.kafka.chat.backend.persistence.kafka;
3 import de.juplo.kafka.chat.backend.domain.Message;
4 import org.apache.kafka.clients.consumer.Consumer;
5 import org.apache.kafka.common.TopicPartition;
8 class ChatRoomLoadingMessageHandlingStrategy implements MessageHandlingStrategy
10 private final Consumer consumer;
11 private final TopicPartition tp;
12 private final long currentOffset;
13 private final long unseenOffset;
15 ChatRoomLoadingMessageHandlingStrategy(
21 this.consumer = consumer;
23 this.currentOffset = currentOffset;
24 this.unseenOffset = unseenOffset;
26 consumer.seek(tp, unseenOffset);
30 public MessageHandlingStrategy handleMessage(Message message)