Last active
October 27, 2022 06:20
-
-
Save DenisNovac/add955d5e97a65d5d29de5bcf2093c1d to your computer and use it in GitHub Desktop.
kafka-ui docker-compose (simple)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
kafka-ui: | |
image: provectuslabs/kafka-ui | |
container_name: kafka-ui | |
ports: | |
- "8080:8080" | |
environment: | |
- KAFKA_CLUSTERS_0_NAME=test | |
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9093 | |
- KAFKA_CLUSTERS_0_READONLY=true | |
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181 | |
depends_on: | |
- kafka | |
zookeeper: | |
image: docker.io/bitnami/zookeeper:3.8 | |
ports: | |
- "2181:2181" | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
kafka: | |
image: docker.io/bitnami/kafka:3.3 | |
ports: | |
- "9092:9092" | |
environment: | |
- KAFKA_BROKER_ID=1 | |
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 | |
- ALLOW_PLAINTEXT_LISTENER=yes | |
- KAFKA_CFG_LISTENERS=UI://:9093,EXTERNAL://:9092 | |
- KAFKA_CFG_ADVERTISED_LISTENERS=UI://kafka:9093,EXTERNAL://localhost:9092 | |
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=UI:PLAINTEXT,EXTERNAL:PLAINTEXT | |
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=UI | |
depends_on: | |
- zookeeper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/opt/homebrew/opt/kafka/bin/kafka-console-producer --topic quickstart-events --bootstrap-server localhost:9092 | |
# for json file | |
jq -rc . message.json | kafka-console-producer --broker-list localhost:9092 --topic test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment