Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guide ("Embedding Kafka" -> "Dockerizing Kafka") #777

Merged
merged 12 commits into from
Jul 20, 2023
2 changes: 1 addition & 1 deletion src/main/docs/guide/kafkaClient/kafkaClientScope.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The previous example can be tested in JUnit with the following test:
include::{testskafka}/producer/inject/BookSenderTest.java[tags=test, indent=0]
----

<1> An embedded version of Kafka is used
<1> A Kafka docker container is used
<2> The `BookSender` is retrieved from the api:context.ApplicationContext[] and a `ProducerRecord` sent

By using the link:{kafkaapi}/org/apache/kafka/clients/producer/KafkaProducer.html[KafkaProducer] API directly you open up even more options if you require transactions (exactly-once delivery) or want control over when records are flushed etc.
8 changes: 8 additions & 0 deletions src/main/docs/guide/kafkaClient/kafkaDockerized.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The previous section introduced the ability to use a Kafka docker container. This is possible by using
guillermocalvo marked this conversation as resolved.
Show resolved Hide resolved
guillermocalvo marked this conversation as resolved.
Show resolved Hide resolved
https://micronaut-projects.github.io/micronaut-test-resources/latest/guide/[Micronaut Test Resources].

The recommended approach to get started is to use https://micronaut.io/launch[Micronaut Launch] and select the `test-resources` feature.

Micronaut Test Resources will automatically start a Kafka container and provide the value of the `kafka.bootstrap.servers` property.

TIP: For more information, see the https://micronaut-projects.github.io/micronaut-test-resources/snapshot/guide/#modules-kafka[Kafka section of the Test Resources documentation].
35 changes: 0 additions & 35 deletions src/main/docs/guide/kafkaClient/kafkaEmbedded.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/docs/guide/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ kafkaClient:
kafkaClientBatch: Sending Records in Batch
kafkaClientScope: Injecting Kafka Producer Beans
kafkaClientTx: Transactions
kafkaEmbedded: Embedding Kafka
kafkaDockerized: Dockerizing Kafka
guillermocalvo marked this conversation as resolved.
Show resolved Hide resolved
kafkaListener:
title: Kafka Consumers Using @KafkaListener
kafkaListenerMethods: Defining @KafkaListener Methods
Expand Down