public static final class KafkaResourceManager.Builder extends TestContainerResourceManager.Builder<KafkaResourceManager>
KafkaResourceManager.containerImageName, containerImageTag, host, port, testId, useStaticContainer| Modifier and Type | Method and Description |
|---|---|
KafkaResourceManager |
build()
Builds and returns a Resource Manager that extends TestContainerResourceManager.
|
KafkaResourceManager.Builder |
setNumTopics(int numTopics)
Sets the number of topics to be used instead of explicitly assign the topic names.
|
KafkaResourceManager.Builder |
setTopicNames(java.util.Set<java.lang.String> topicNames)
Sets names of topics to be used to that of a static kafka instance.
|
setContainerImageName, setContainerImageTag, setHost, setPort, useStaticContainerpublic KafkaResourceManager.Builder setTopicNames(java.util.Set<java.lang.String> topicNames)
Note: if a topic name is set, and a static kafka server is being used (useStaticContainer() is also called on the builder), then a topic will be created on the static server if it does not exist, and it will NOT be removed when cleanupAll() is called on the KafkaResourceManager.
topicNames - A set of topic names.public KafkaResourceManager.Builder setNumTopics(int numTopics)
Note: if number of topics is set, and a static kafka server is being used (useStaticContainer() is also called on the builder), then the assigned number of topics will be created on the static server, and it will be removed when cleanupAll() is called on the KafkaResourceManager.
numTopics - number of topics to be created. Default is 1.public KafkaResourceManager build()
TestContainerResourceManager.Builderbuild in class TestContainerResourceManager.Builder<KafkaResourceManager>