Class KafkaDevServicesBuildTimeConfig
- java.lang.Object
-
- io.quarkus.kafka.client.deployment.KafkaDevServicesBuildTimeConfig
-
public class KafkaDevServicesBuildTimeConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKafkaDevServicesBuildTimeConfig.Provider
-
Field Summary
Fields Modifier and Type Field Description Optional<Boolean>enabledIf Dev Services for Kafka has been explicitly enabled or disabled.Optional<String>imageNameThe Kafka container image to use.Optional<Integer>portOptional fixed port the dev service will listen to.KafkaDevServicesBuildTimeConfig.ProviderproviderKafka dev service container type.RedPandaBuildTimeConfigredpandaAllows configuring the Red Panda broker.StringserviceNameThe value of thequarkus-dev-service-kafkalabel attached to the started container.booleansharedIndicates if the Kafka broker managed by Quarkus Dev Services is shared.Map<String,Integer>topicPartitionsThe topic-partition pairs to create in the Dev Services Kafka broker.DurationtopicPartitionsTimeoutTimeout for admin client calls used in topic creation.
-
Constructor Summary
Constructors Constructor Description KafkaDevServicesBuildTimeConfig()
-
-
-
Field Detail
-
enabled
@ConfigItem public Optional<Boolean> enabled
If Dev Services for Kafka has been explicitly enabled or disabled. Dev Services are generally enabled by default, unless there is an existing configuration present. For Kafka, Dev Services starts a broker unlesskafka.bootstrap.serversis set or if all the Reactive Messaging Kafka channel are configured with abootstrap.servers.
-
port
@ConfigItem public Optional<Integer> port
Optional fixed port the dev service will listen to.If not defined, the port will be chosen randomly.
-
provider
@ConfigItem(defaultValue="redpanda") public KafkaDevServicesBuildTimeConfig.Provider provider
Kafka dev service container type.Redpanda, Strimzi and kafka-native container providers are supported. Default is redpanda.
For Redpanda: See https://vectorized.io/docs/quick-start-docker/ and https://hub.docker.com/r/vectorized/redpanda
For Strimzi: See https://github.com/strimzi/test-container and https://quay.io/repository/strimzi-test-container/test-container
For Kafka Native: See https://github.com/ozangunalp/kafka-native and https://quay.io/repository/ogunalp/kafka-native
Note that Strimzi and Kafka Native images are launched in Kraft mode.
-
imageName
@ConfigItem public Optional<String> imageName
The Kafka container image to use.Dependent on the provider.
-
shared
@ConfigItem(defaultValue="true") public boolean shared
Indicates if the Kafka broker managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Kafka starts a new container.The discovery uses the
quarkus-dev-service-kafkalabel. The value is configured using theservice-nameproperty.Container sharing is only used in dev mode.
-
serviceName
@ConfigItem(defaultValue="kafka") public String serviceName
The value of thequarkus-dev-service-kafkalabel attached to the started container. This property is used whensharedis set totrue. In this case, before starting a container, Dev Services for Kafka looks for a container with thequarkus-dev-service-kafkalabel set to the configured value. If found, it will use this container instead of starting a new one. Otherwise, it starts a new container with thequarkus-dev-service-kafkalabel set to the specified value.This property is used when you need multiple shared Kafka brokers.
-
topicPartitions
@ConfigItem public Map<String,Integer> topicPartitions
The topic-partition pairs to create in the Dev Services Kafka broker. After the broker is started, given topics with partitions are created, skipping already existing topics. For example,quarkus.kafka.devservices.topic-partitions.test=2will create a topic namedtestwith 2 partitions.The topic creation will not try to re-partition existing topics with different number of partitions.
-
topicPartitionsTimeout
@ConfigItem(defaultValue="2S") public Duration topicPartitionsTimeout
Timeout for admin client calls used in topic creation.Defaults to 2 seconds.
-
redpanda
@ConfigItem public RedPandaBuildTimeConfig redpanda
Allows configuring the Red Panda broker.
-
-