Kafka Companion clearing the topics for the component tests #2662
-
I am using Kafka Companion for test purposes and I am looking for a solution to clear/purge the topics. The problem is that if I have multiple test cases, then there is a huge change to exhcange the messages between the test cases, which makes the tests fail. It means that some of the consumers pick the wrong message out of the topic, because the tests use the same input and output topics. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can either delete and recreate the topic. Or call |
Beta Was this translation helpful? Give feedback.
You can either delete and recreate the topic. Or call
companion.topics().clear(topicNames)
to delete records.Note that deleting records inside a topic doesn't delete committed offsets.