From: Kai Moritz Date: Mon, 4 Mar 2024 13:51:42 +0000 (+0100) Subject: WIP:refactor: Refined channel-states, introduced `ChannelState` -- ALIGN X-Git-Tag: rebase--2024-03-05--09-07~11 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=a186e1bbf9bffc205d4404f7477bad29b5df25f9;p=demos%2Fkafka%2Fchat WIP:refactor: Refined channel-states, introduced `ChannelState` -- ALIGN --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java index c2c28014..0c6de1d5 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java @@ -21,9 +21,9 @@ public class ConsumerTaskRunner public void joinConsumerTasks() throws InterruptedException { dataChannelConsumerTaskExecutor.joinConsumerTaskJob(); - while (infoChannel.isLoadInProgress()) + while (infoChannel.getChannelState() != ChannelState.SHUTTING_DOWN) { - log.info("Waiting for {} to finish loading...", infoChannel); + log.info("Waiting for {} to shut down...", infoChannel); Thread.sleep(1000); } infoChannelConsumerTaskExecutor.joinConsumerTaskJob();