Skip to content

Commit a30a685

Browse files
authored
Merge pull request #50214 from jedla97/update-kafka
Update devservice strimzi Kafka image to 4.1.0
2 parents 11703c1 + ba2f6d9 commit a30a685

File tree

7 files changed

+25
-97
lines changed

7 files changed

+25
-97
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For Strimzi, you can select any image with a Kafka version which has Kraft suppo
8282

8383
[source, properties]
8484
----
85-
quarkus.kafka.devservices.image-name=quay.io/strimzi-test-container/test-container:0.106.0-kafka-3.7.0
85+
quarkus.kafka.devservices.image-name=quay.io/strimzi-test-container/test-container:0.112.0-kafka-4.1.0
8686
----
8787

8888
== Configuring Kafka topics

docs/src/main/asciidoc/kafka-getting-started.adoc

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -403,38 +403,19 @@ You can follow the instructions from the https://kafka.apache.org/quickstart[Apa
403403

404404
[source, yaml]
405405
----
406-
version: '3.5'
407-
408406
services:
409407
410-
zookeeper:
411-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
412-
command: [
413-
"sh", "-c",
414-
"bin/zookeeper-server-start.sh config/zookeeper.properties"
415-
]
416-
ports:
417-
- "2181:2181"
418-
environment:
419-
LOG_DIR: /tmp/logs
420-
networks:
421-
- kafka-quickstart-network
422-
423-
kafka:
424-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
408+
kafka:
409+
image: quay.io/strimzi/kafka:latest-kafka-4.1.0
425410
command: [
426411
"sh", "-c",
427-
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
412+
"./bin/kafka-storage.sh format --standalone -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/server.properties && ./bin/kafka-server-start.sh ./config/server.properties --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS}"
428413
]
429-
depends_on:
430-
- zookeeper
431414
ports:
432415
- "9092:9092"
433416
environment:
434417
LOG_DIR: "/tmp/logs"
435-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
436-
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
437-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
418+
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092'
438419
networks:
439420
- kafka-quickstart-network
440421

docs/src/main/asciidoc/kafka-schema-registry-avro.adoc

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -319,39 +319,21 @@ Create a `docker-compose.yaml` file at the root of the project with the followin
319319

320320
[source,yaml]
321321
----
322-
version: '2'
323-
324322
services:
325323
326-
zookeeper:
327-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
328-
command: [
329-
"sh", "-c",
330-
"bin/zookeeper-server-start.sh config/zookeeper.properties"
331-
]
332-
ports:
333-
- "2181:2181"
334-
environment:
335-
LOG_DIR: /tmp/logs
336-
337324
kafka:
338-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
325+
image: quay.io/strimzi/kafka:latest-kafka-4.1.0
339326
command: [
340-
"sh", "-c",
341-
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
327+
"sh", "-c",
328+
"./bin/kafka-storage.sh format --standalone -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/server.properties && ./bin/kafka-server-start.sh ./config/server.properties"
342329
]
343-
depends_on:
344-
- zookeeper
345330
ports:
346331
- "9092:9092"
347332
environment:
348333
LOG_DIR: "/tmp/logs"
349-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
350-
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
351-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
352334
353335
schema-registry:
354-
image: apicurio/apicurio-registry-mem:2.4.2.Final
336+
image: apicurio/apicurio-registry-mem:2.6.13.Final
355337
ports:
356338
- 8081:8080
357339
depends_on:
@@ -545,7 +527,7 @@ If we couldn't use Dev Services and wanted to start a Kafka broker and Apicurio
545527
<dependency>
546528
<groupId>io.strimzi</groupId>
547529
<artifactId>strimzi-test-container</artifactId>
548-
<version>0.105.0</version>
530+
<version>0.112.0</version>
549531
<scope>test</scope>
550532
<exclusions>
551533
<exclusion>
@@ -559,7 +541,7 @@ If we couldn't use Dev Services and wanted to start a Kafka broker and Apicurio
559541
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
560542
.build.gradle
561543
----
562-
testImplementation("io.strimzi:strimzi-test-container:0.105.0") {
544+
testImplementation("io.strimzi:strimzi-test-container:0.112.0") {
563545
exclude group: "org.apache.logging.log4j", module: "log4j-core"
564546
}
565547
----

docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -347,39 +347,21 @@ Create a `docker-compose.yaml` file at the root of the project with the followin
347347

348348
[source,yaml]
349349
----
350-
version: '2'
351-
352350
services:
353351
354-
zookeeper:
355-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
356-
command: [
357-
"sh", "-c",
358-
"bin/zookeeper-server-start.sh config/zookeeper.properties"
359-
]
360-
ports:
361-
- "2181:2181"
362-
environment:
363-
LOG_DIR: /tmp/logs
364-
365352
kafka:
366-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
353+
image: quay.io/strimzi/kafka:latest-kafka-4.1.0
367354
command: [
368-
"sh", "-c",
369-
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
355+
"sh", "-c",
356+
"./bin/kafka-storage.sh format --standalone -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/server.properties && ./bin/kafka-server-start.sh ./config/server.properties"
370357
]
371-
depends_on:
372-
- zookeeper
373358
ports:
374359
- "9092:9092"
375360
environment:
376361
LOG_DIR: "/tmp/logs"
377-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
378-
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
379-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
380362
381363
schema-registry:
382-
image: apicurio/apicurio-registry-mem:2.4.2.Final
364+
image: apicurio/apicurio-registry-mem:2.6.13.Final
383365
ports:
384366
- 8081:8080
385367
depends_on:
@@ -573,7 +555,7 @@ If we couldn't use Dev Services and wanted to start a Kafka broker and Apicurio
573555
<dependency>
574556
<groupId>io.strimzi</groupId>
575557
<artifactId>strimzi-test-container</artifactId>
576-
<version>0.105.0</version>
558+
<version>0.112.0</version>
577559
<scope>test</scope>
578560
<exclusions>
579561
<exclusion>
@@ -587,7 +569,7 @@ If we couldn't use Dev Services and wanted to start a Kafka broker and Apicurio
587569
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
588570
.build.gradle
589571
----
590-
testImplementation("io.strimzi:strimzi-test-container:0.105.0") {
572+
testImplementation("io.strimzi:strimzi-test-container:0.112.0") {
591573
exclude group: "org.apache.logging.log4j", module: "log4j-core"
592574
}
593575
----

docs/src/main/asciidoc/kafka-streams.adoc

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -491,41 +491,24 @@ This is done in order to demonstrate scaling the `aggregator` aggregation to mul
491491
The `Dockerfile` created by Quarkus by default needs one adjustment for the `aggregator` application in order to run the Kafka Streams pipeline.
492492
To do so, edit the file `aggregator/src/main/docker/Dockerfile.jvm` and replace the line `FROM fabric8/java-alpine-openjdk8-jre` with `FROM fabric8/java-centos-openjdk8-jdk`.
493493

494-
Next create a Docker Compose file (`docker-compose.yaml`) for spinning up the two applications as well as Apache Kafka and ZooKeeper like so:
494+
Next create a Docker Compose file (`docker-compose.yaml`) for spinning up the two applications as well as Apache Kafka like so:
495495

496496
[source, yaml]
497497
----
498-
version: '3.5'
499-
500498
services:
501-
zookeeper:
502-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
503-
command: [
504-
"sh", "-c",
505-
"bin/zookeeper-server-start.sh config/zookeeper.properties"
506-
]
507-
ports:
508-
- "2181:2181"
509-
environment:
510-
LOG_DIR: /tmp/logs
511-
networks:
512-
- kafkastreams-network
513499
kafka:
514-
image: quay.io/strimzi/kafka:0.41.0-kafka-3.7.0
500+
image: quay.io/strimzi/kafka:latest-kafka-4.1.0
515501
command: [
516502
"sh", "-c",
517-
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT} --override num.partitions=$${KAFKA_NUM_PARTITIONS}"
503+
"./bin/kafka-storage.sh format --standalone -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/server.properties && ./bin/kafka-server-start.sh ./config/server.properties --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override num.partitions=$${KAFKA_NUM_PARTITIONS} --override group.min.session.timeout.ms=$${KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS}"
518504
]
519-
depends_on:
520-
- zookeeper
521505
ports:
522506
- "9092:9092"
523507
environment:
524508
LOG_DIR: "/tmp/logs"
525-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
526-
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
527-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
509+
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092'
528510
KAFKA_NUM_PARTITIONS: 3
511+
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 100
529512
networks:
530513
- kafkastreams-network
531514
@@ -566,7 +549,7 @@ This image provides several useful tools such as _kafkacat_ and _httpie_:
566549

567550
[source,bash,subs=attributes+]
568551
----
569-
docker run --tty --rm -i --network ks debezium/tooling:1.1
552+
docker run --tty --rm -i --network ks debezium/tooling:latest
570553
----
571554

572555
Within the tooling container, run _kafkacat_ to examine the results of the streaming pipeline:

docs/src/main/asciidoc/kafka.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ The configuration of the created Kafka broker can be customized using `@Resource
24752475
[source,java]
24762476
----
24772477
@QuarkusTestResource(value = KafkaCompanionResource.class, initArgs = {
2478-
@ResourceArg(name = "strimzi.kafka.image", value = "quay.io/strimzi-test-container/test-container:0.106.0-kafka-3.7.0"), // Image name
2478+
@ResourceArg(name = "strimzi.kafka.image", value = "quay.io/strimzi-test-container/test-container:0.112.0-kafka-4.1.0"), // Image name
24792479
@ResourceArg(name = "kafka.port", value = "9092"), // Fixed port for kafka, by default it will be exposed on a random port
24802480
@ResourceArg(name = "kraft", value = "true"), // Enable Kraft mode
24812481
@ResourceArg(name = "num.partitions", value = "3"), // Other custom broker configurations

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
@@ -45,7 +45,7 @@ public interface KafkaDevServicesBuildTimeConfig {
4545

4646
enum Provider {
4747
REDPANDA("docker.io/redpandadata/redpanda:v24.1.2"),
48-
STRIMZI("quay.io/strimzi-test-container/test-container:latest-kafka-3.7.0"),
48+
STRIMZI("quay.io/strimzi-test-container/test-container:latest-kafka-4.1.0"),
4949
KAFKA_NATIVE("quay.io/ogunalp/kafka-native:latest");
5050

5151
private final String defaultImageName;

0 commit comments

Comments
 (0)