Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minhhungit/kafka-kraft-cluster-docker-compose
workable kafka cluster with kraft mode using docker-compose
https://github.com/minhhungit/kafka-kraft-cluster-docker-compose
docker-compose kafka kafka-cluster kafka-kraft kafka-ui kafka-zookeeperless
Last synced: about 1 month ago
JSON representation
workable kafka cluster with kraft mode using docker-compose
- Host: GitHub
- URL: https://github.com/minhhungit/kafka-kraft-cluster-docker-compose
- Owner: minhhungit
- Created: 2022-11-17T02:21:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T10:39:25.000Z (5 months ago)
- Last Synced: 2024-11-13T01:34:27.769Z (about 2 months ago)
- Topics: docker-compose, kafka, kafka-cluster, kafka-kraft, kafka-ui, kafka-zookeeperless
- Language: C#
- Homepage:
- Size: 384 KB
- Stars: 17
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: FUNDING.yml
Awesome Lists containing this project
- awesome-kafka - Kafka Cluster Kraft Mode - DockerCompose - Workable kafka cluster with kraft mode using docker-compose. (Libraries / Kafka)
README
# KAFKA CLUSTER KRAFT MODE - DOCKER COMPOSE
- 3 nodes
- UI using `kafka UI` http://localhost:8080/
- UI using `kouncil` http://localhost:8082/## How to run
```
docker-compose up -d
```Before connecting to cluster from outside docker ( ex from your docker host - your PC ), we also need to config host file:
Example for windows:
```
# C:\Windows\System32\drivers\etc\hosts127.0.0.1 kafka01
127.0.0.1 kafka02
127.0.0.1 kafka03
```### Done !
## Connection string (public)
> kafka01:29192,kafka02:29292,kafka03:29392
### .NET Demo (run outside docker)
[Check here](https://github.com/minhhungit/kafka-kraft-cluster-docker-compose/tree/main/client/KafkaDemo)
Or run demo directly inside docker using bellow commands:
```
docker run -it --rm --network kafka-kraft-cluster-docker-compose_default confluentinc/cp-kafka /bin/kafka-console-producer --bootstrap-server kafka01:9092,kafka02:9092,kafka03:9092 --topic test_topic
```then enter some text to produce message
## Performance test
inside docker (container => container)
```
docker run -it --rm --network kafka-kraft-cluster-docker-compose_default confluentinc/cp-kafka /bin/kafka-producer-perf-test --topic test_topic --num-records 1000000 --throughput -1 --producer-props bootstrap.servers=kafka01:9092,kafka02:9092,kafka03:9092 batch.size=16384 acks=1 linger.ms=50 --record-size 1000```
---
outside docker (from host => container)
```
$ .\kafka-producer-perf-test.bat --topic test_topic --num-records 1000000 --throughput -1 --producer-props bootstrap.servers=kafka01:29192,kafka02:29292,kafka03:29392 acks=1 linger.ms=50 --record-size 1000
```---
```
$ .\kafka-consumer-groups.bat --bootstrap-server kafka01:29192,kafka02:29292,kafka03:29392 --group my-group1 --describe
```