junlapong / kafka-poc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kafka

docker-compose

docker pull --tls-verify=false docker.io/confluentinc/cp-zookeeper:latest
docker pull --tls-verify=false docker.io/confluentinc/cp-kafka:latest
docker pull --tls-verify=false docker.io/provectuslabs/kafka-ui:latest

docker-compose up

$ docker-compose logs kafka | grep -i started
[2024-02-11 08:39:14,084] DEBUG [ReplicaStateMachine controllerId=1] Started replica state machine with initial state -> HashMap() (kafka.controller.ZkReplicaStateMachine)
[2024-02-11 08:39:14,101] DEBUG [PartitionStateMachine controllerId=1] Started partition state machine with initial state -> HashMap() (kafka.controller.ZkPartitionStateMachine)
[2024-02-11 08:39:14,152] INFO [KafkaServer id=1] started (kafka.server.KafkaServer)

kafka-ui

http://localhost:9080

> Configure new cluster'
Cluster name: kafka-docker
Bootstrap Servers *
Host: kafka
Port: 9092

Tools

kcat

macOS

brew install kcat

docker

alias kcat='docker run --rm -ti --network=host docker.io/edenhill/kcat:1.7.1'
$ kcat -b localhost:29092 -L
Metadata for all topics (from broker 1: localhost:29092/1):
 1 brokers:
  broker 1 at localhost:29092 (controller)
 0 topics:

kafka-ui

alias kui='docker run --rm -it --network=host -p 8080:8080 -e DYNAMIC_CONFIG_ENABLED=true docker.io/provectuslabs/kafka-ui'
$ kui

> Configure new cluster'
Cluster name: kafka-local
Bootstrap Servers *
Host: localhost
Port: 29092

Notes

About