import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
CompletableFuture<Void> chatRoomChannelConsumerJob;
CompletableFuture<Void> chatMessageChannelConsumerJob;
CompletableFuture<Void> chatRoomChannelConsumerJob;
CompletableFuture<Void> chatMessageChannelConsumerJob;
log.info("Waiting for the consumer of the ChatRoomChannel to finish its work");
chatRoomChannelConsumerJob.join();
log.info("Joined the consumer of the ChatRoomChannel");
log.info("Waiting for the consumer of the ChatRoomChannel to finish its work");
chatRoomChannelConsumerJob.join();
log.info("Joined the consumer of the ChatRoomChannel");
log.info("Waiting for the consumer of the ChatMessageChannel to finish its work");
chatMessageChannelConsumerJob.join();
log.info("Joined the consumer of the ChatMessageChannel");
log.info("Waiting for the consumer of the ChatMessageChannel to finish its work");
chatMessageChannelConsumerJob.join();
log.info("Joined the consumer of the ChatMessageChannel");