bakdata / fluent-kafka-streams-tests

Fluent Kafka Streams Test with Java
https://medium.com/bakdata/fluent-kafka-streams-tests-e641785171ec
MIT License
88 stars 16 forks source link

Support topolgies with dynamic output topics #47

Closed torbsto closed 3 years ago

torbsto commented 3 years ago

If a topology uses a TopicNameExtractor, iterating over the sub-topologies doesn't yield the topic name, as it is not known beforehand. Such cases would throw a NPE (see #46), because we added null to the set of output topics.

This PR just adds a check for these cases. If a TopicnameExtractor is used, developers must manually add the output topic to the set with testTopology.getOutputTopics().add("output").

Closes #46