be0136a05604d089c492ca1ca2e915f14d9b70fb
[demos/kafka/chat] /
1 package de.juplo.kafka.chat.backend.persistence.kafka;
2
3 import de.juplo.kafka.chat.backend.domain.Message;
4 import de.juplo.kafka.chat.backend.domain.ShardNotOwnedException;
5 import lombok.RequiredArgsConstructor;
6 import org.apache.kafka.common.TopicPartition;
7 import reactor.core.publisher.Mono;
8
9 import java.time.LocalDateTime;
10
11
12 @RequiredArgsConstructor
13 class ChatroomInactiveMessageHandlingStrategy implements MessageHandlingStrategy
14 {
15   private final int shard;
16
17   @Override
18   public Mono<Message> handleMessage(
19       Message.MessageKey key,
20       LocalDateTime timestamp,
21       String text)
22   {
23     throw new ShardNotOwnedException(shard);
24   }
25 }