Skip to content

Commit a2e30b6

Browse files
authored
Merge pull request #48399 from cescoffier/fix-property-to-initialize-topic-parations-in-the-kafka-dev-service
Fix and improve documentation about topic-partition initialization in the kafka dev service
2 parents 4b57452 + 4128208 commit a2e30b6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/src/main/asciidoc/kafka-dev-services.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,14 @@ quarkus.kafka.devservices.image-name=quay.io/strimzi-test-container/test-contain
8989

9090
You can configure the Dev Services for Kafka to create topics once the broker is started.
9191
Topics are created with given number of partitions and 1 replica.
92+
The syntax is the following:
9293

93-
The following example creates a topic named `test` with 3 partitions, and a second topic named `messages` with 2 partitions.
94+
[source, properties]
95+
----
96+
quarkus.kafka.devservices.topic-partitions.<topic-name>=<number-of-partitions>
97+
----
98+
99+
The following example creates a topic named `test` with three partitions, and a second topic named `messages` with two partitions.
94100

95101
[source, properties]
96102
----

extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaDevServicesBuildTimeConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public String getDefaultImageName() {
9696
/**
9797
* The topic-partition pairs to create in the Dev Services Kafka broker.
9898
* After the broker is started, given topics with partitions are created, skipping already existing topics.
99-
* For example, <code>quarkus.kafka.devservices.topic-partitions.test=2</code> will create a topic named
99+
* For example, <code>quarkus.kafka.devservices.topic-partitions.my-topic=2</code> will create a topic named
100100
* {@code test} with 2 partitions.
101101
* <p>
102102
* The topic creation will not try to re-partition existing topics with different number of partitions.

0 commit comments

Comments
 (0)