Package io.strimzi.test.container
Class StrimziConnectCluster.StrimziConnectClusterBuilder
java.lang.Object
io.strimzi.test.container.StrimziConnectCluster.StrimziConnectClusterBuilder
- Enclosing class:
- StrimziConnectCluster
Builder class for
StrimziConnectCluster.
Use this builder to create instances of StrimziConnectCluster.
You must at least call withKafkaCluster(StrimziKafkaCluster), and
withGroupId(String) before calling build().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return aStrimziConnectClusterinstance based on the provided configurations.withAdditionalConnectConfiguration(Map<String, String> additionalConnectConfiguration) Add additional Kafka Connect configuration parameters.withGroupId(String groupId) Specify the group.id of the Connect cluster.withKafkaCluster(StrimziKafkaCluster kafkaCluster) Set the Kafka cluster the Kafka Connect cluster will use to.withKafkaVersion(String kafkaVersion) Specify the Kafka version to be used for the Connect workers in the cluster.withNumberOfWorkers(int workersNum) Set the number of Kafka Connect workers in the cluster.Disable the FileStreams connectors.
-
Constructor Details
-
StrimziConnectClusterBuilder
public StrimziConnectClusterBuilder()
-
-
Method Details
-
withKafkaCluster
public StrimziConnectCluster.StrimziConnectClusterBuilder withKafkaCluster(StrimziKafkaCluster kafkaCluster) Set the Kafka cluster the Kafka Connect cluster will use to.- Parameters:
kafkaCluster- theStrimziKafkaClusterinstance- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
withNumberOfWorkers
Set the number of Kafka Connect workers in the cluster. If not called, the cluster has a single worker.- Parameters:
workersNum- the number of Kafka Connect workers- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
withAdditionalConnectConfiguration
public StrimziConnectCluster.StrimziConnectClusterBuilder withAdditionalConnectConfiguration(Map<String, String> additionalConnectConfiguration) Add additional Kafka Connect configuration parameters. These configurations are applied to all workers in the cluster.- Parameters:
additionalConnectConfiguration- a map of additional Kafka Connect configuration options- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
withKafkaVersion
Specify the Kafka version to be used for the Connect workers in the cluster. If not called, the latest Kafka version available fromKafkaVersionServicewill be used.- Parameters:
kafkaVersion- the desired Kafka version for the Connect cluster- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
withoutFileConnectors
Disable the FileStreams connectors. If not called, the FileSteams connectors are added to plugin.path.- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
withGroupId
Specify the group.id of the Connect cluster.- Parameters:
groupId- the group id- Returns:
- the current instance of
StrimziConnectClusterBuilderfor method chaining
-
build
Build and return aStrimziConnectClusterinstance based on the provided configurations.- Returns:
- a new instance of
StrimziConnectCluster
-