refactor: Introduced `ConsumerTaskExecutor` -- Aligned code
authorKai Moritz <kai@juplo.de>
Thu, 14 Sep 2023 21:42:59 +0000 (23:42 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 14 Sep 2023 22:19:24 +0000 (00:19 +0200)
commitb8063ebc867afaf547191e173a8ef1e40c717a61
treedda8ed429620bfa31834562e524cf0102ebb9716
parentd773623ebc307bbaa1962e712ff91b4709033edb
refactor: Introduced `ConsumerTaskExecutor` -- Aligned code

* Moved startup-logic in a separate class (`ConsumerTaskExecutor`), so
  that it is reusable more easily in test scenarios.
* `KafkaServicesApplicationRunner` is instanciated via `@Component`, so
  that it is _not_ instanciated automatically, if the configuration is
  triggered explicitly via `KafkaServicesConfiguration` in test scenarios.
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskExecutor.java
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesApplicationRunner.java
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaServicesConfiguration.java
src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java