Class KafkaDevServicesBuildTimeConfig


  • public class KafkaDevServicesBuildTimeConfig
    extends Object
    • 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 unless kafka.bootstrap.servers is set or if all the Reactive Messaging Kafka channel are configured with a bootstrap.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-kafka label. The value is configured using the service-name property.

        Container sharing is only used in dev mode.

      • serviceName

        @ConfigItem(defaultValue="kafka")
        public String serviceName
        The value of the quarkus-dev-service-kafka label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Kafka looks for a container with the quarkus-dev-service-kafka label 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 the quarkus-dev-service-kafka label 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=2 will create a topic named test with 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.

    • Constructor Detail

      • KafkaDevServicesBuildTimeConfig

        public KafkaDevServicesBuildTimeConfig()