I'm working on a project where we are configuring all of our topics in property files, so our tests have to know about the contents of the property files to configure the correct topics. The alternative to this is to use @TestPropertySource
to override our topic properties, but we have a lot of topics, so it's not that convenient.
Ideally the topic attribute of @EmbeddedKafka
would be able to accept and resolve property placeholders.
Example:
@EmbeddedKafka(topics = { "${kafka.topic.one}", "${kafka.topic.two}" })