Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions content/modules/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,21 @@ docs:
const kafkaContainer = await new KafkaContainer().withExposedPorts(9093).start();
```
description: |
Kafka is an open-source distributed event streaming platform for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.
---
[Apache Kafka](https\://kafka.apache.org) is an open-source distributed event streaming platform for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.
This module allows you to run a single node Kafka installation with just a few lines of code.

Even better you don't need to manage an external Zookeeper installation. By default it'll run in the same container where Kafka broker is running, you can also programmatically configure to run Zookeeper in another container or run Kafka with KRaft enabled.

---

The module helps to configure your application or tests to connect to the broker exposing convenience API.

For example, in Java getting the bootstrap servers url is one method call away: `kafka.getBootstrapServers()`

And if your setup needs other services to access Kafka, for example you want to run a Schema Registry or a Confluent Control Center, you can put your Kafka container on the `Network` and expose it to both applications and tools running in other containers and applications running on your host machine.

## Next steps

* Try it yourself with the [Testing Spring Boot Kafka Listener using Testcontainers](https://testcontainers.com/guides/testing-spring-boot-kafka-listener-using-testcontainers/) guide
* Read the blog post [Testing Kafka Applications with Testcontainers](https://www.atomicjar.com/2023/06/testing-kafka-applications-with-testcontainers/)