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>
Sat, 27 Jan 2024 15:38:57 +0000 (16:38 +0100)
commitd39eeb745ac8e14eecb110479618b103ec60ff4e
tree80983a438ea3cccc74db24bd1d4c302424be5dc9
parent21f92bb7319fee9906ebf9fbf8535ef6ad1b955b
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