Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class KafkaContainerWrapper extends KafkaContainer {
private static KafkaContainerWrapper CONTAINER
private KafkaContainerWrapper(String confluentPlatformVersion) {
super(confluentPlatformVersion)
}
static KafkaContainer getContainer() {
// container creation logic
CONTAINER
}
@Override
protected void containerIsStarted(InspectContainerResponse containerInfo, boolean reused) {
if (!reused) {
createKafkaTopics()
}
}
void createKafkaTopics() {
// invoking commands on container to create Apache Kafka topics
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment