WIP
authorKai Moritz <kai@juplo.de>
Fri, 17 Feb 2023 18:27:09 +0000 (19:27 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 26 Feb 2023 14:35:29 +0000 (15:35 +0100)
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaChatHomeService.java
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/MessageHandler.java

index 70a96bc..2e3b42f 100644 (file)
@@ -35,7 +35,7 @@ public class KafkaChatHomeService implements ChatHomeService, ConsumerRebalanceL
     for (int i=0; i< numShards; i++)
     {
       this.offsets[i] = 0l;
-      this.handlers[i] = new MessageHandler(new TopicPartition(topic, i));
+      this.handlers[i] = new MessageHandler(consumer, new TopicPartition(topic, i));
     }
     this.chatrooms = new Map[numShards];
   }
index 271f52d..7209c22 100644 (file)
@@ -1,6 +1,20 @@
 package de.juplo.kafka.chat.backend.persistence.kafka;
 
+import de.juplo.kafka.chat.backend.domain.Message;
+import lombok.RequiredArgsConstructor;
+import org.apache.kafka.clients.consumer.Consumer;
+import org.apache.kafka.common.TopicPartition;
+
+
+@RequiredArgsConstructor
 class MessageHandler
 {
+  private final Consumer consumer;
+  private final TopicPartition tp;
+
+
+  void handleMessage(Message message)
+  {
 
+  }
 }