View Source Testcontainers.KafkaContainer (testcontainers v1.11.6)

Provides functionality for creating and managing Kafka container configurations.

Summary

Functions

Creates a new KafkaContainer struct with default configurations.

Overrides the default broker id used for the Kafka container.

Overrides the default kafka port used for the Kafka container.

Overrides the default zookeeper host used for the Kafka container. Available only when consensus_strategy is kraft

Overrides the default consensus strategy used for the Kafka container.

Overrides the default image used for the Kafka container. Right now we support only confluentinc images.

Overrides the default kafka port used for the Kafka container.

Set the reuse flag to reuse the container if it is already running.

Overrides the default wait timeout used for the Kafka container.

Overrides the default zookeeper host used for the Kafka container. Available only when consensus_strategy is external

Overrides the default zookeeper port used for the Kafka container.

Functions

Creates a new KafkaContainer struct with default configurations.

Link to this function

with_broker_id(config, broker_id)

View Source

Overrides the default broker id used for the Kafka container.

Link to this function

with_broker_port(config, broker_port)

View Source

Overrides the default kafka port used for the Kafka container.

Link to this function

with_cluster_id(config, cluster_id)

View Source

Overrides the default zookeeper host used for the Kafka container. Available only when consensus_strategy is kraft

Link to this function

with_consensus_strategy(config, consensus_strategy)

View Source

Overrides the default consensus strategy used for the Kafka container.

Link to this function

with_image(config, image)

View Source

Overrides the default image used for the Kafka container. Right now we support only confluentinc images.

Link to this function

with_kafka_port(config, kafka_port)

View Source

Overrides the default kafka port used for the Kafka container.

Link to this function

with_reuse(config, reuse)

View Source

Set the reuse flag to reuse the container if it is already running.

Link to this function

with_topic_partitions(config, topic_partitions)

View Source

Overrides the default topic

Link to this function

with_wait_timeout(config, wait_timeout)

View Source

Overrides the default wait timeout used for the Kafka container.

Link to this function

with_zookeeper_host(config, zookeeper_host)

View Source

Overrides the default zookeeper host used for the Kafka container. Available only when consensus_strategy is external

Link to this function

with_zookeeper_port(config, zookeeper_port)

View Source

Overrides the default zookeeper port used for the Kafka container.