NG
authorKai Moritz <kai@juplo.de>
Fri, 18 Aug 2023 14:29:23 +0000 (16:29 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 18 Aug 2023 15:18:41 +0000 (17:18 +0200)
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesApplicationRunner.java

index d0166c5..653e366 100644 (file)
@@ -27,14 +27,11 @@ public class KafkaServicesApplicationRunner implements ApplicationRunner
   @Autowired
   ConfigurableApplicationContext context;
 
-  @Autowired
-  Consumer<Integer, CreateChatRoomRequestTo> chatRoomChannelConsumer;
   @Autowired
   ChatMessageChannel chatMessageChannel;
   @Autowired
   Consumer<String, ChatMessageTo> chatMessageChannelConsumer;
 
-  CompletableFuture<Void> chatRoomChannelConsumerJob;
   CompletableFuture<Void> chatMessageChannelConsumerJob;
 
 
@@ -51,16 +48,6 @@ public class KafkaServicesApplicationRunner implements ApplicationRunner
         });
   }
 
-  @PreDestroy
-  public void joinChatRoomChannelConsumerJob()
-  {
-    log.info("Signaling the consumer of the CahtRoomChannel to quit its work");
-    chatRoomChannelConsumer.wakeup();
-    log.info("Waiting for the consumer of the ChatRoomChannel to finish its work");
-    chatRoomChannelConsumerJob.join();
-    log.info("Joined the consumer of the ChatRoomChannel");
-  }
-
   @PreDestroy
   public void joinChatMessageChannelConsumerJob()
   {