Interface KafkaDevServicesBuildTimeConfig


public interface KafkaDevServicesBuildTimeConfig
  • Method Details

    • enabled

      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

      Optional<Integer> port()
      Optional fixed port the dev service will listen to.

      If not defined, the port will be chosen randomly.

    • provider

      @WithDefault("redpanda") KafkaDevServicesBuildTimeConfig.Provider provider()
      Kafka dev service container type.

      Redpanda, Strimzi and kafka-native container providers are supported. Default is redpanda.

      For Redpanda: See https://docs.redpanda.com/current/get-started/quick-start/ and https://hub.docker.com/r/redpandadata/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

      Optional<String> imageName()
      The Kafka container image to use.

      Dependent on the provider.

    • shared

      @WithDefault("true") 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

      @WithDefault("kafka") 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

      @ConfigDocMapKey("topic-name") 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.my-topic=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

      @WithDefault("2S") Duration topicPartitionsTimeout()
      Timeout for admin client calls used in topic creation.

      Defaults to 2 seconds.

    • containerEnv

      @ConfigDocMapKey("environment-variable-name") Map<String,String> containerEnv()
      Environment variables that are passed to the container.
    • redpanda

      Allows configuring the Redpanda broker.
    • strimzi

      Allows configuring the Strimzi broker.
    • effectiveImageName

      default String effectiveImageName()
      Returns:
      the image name if set, otherwise the default image name for the provider.