개발
Kafkacat 을 이용한 Kafka 동작 확인 방법 : kafkacat usage
쩌비군
2021. 7. 18. 00:46
728x90
Kafka 를 설치하고 동작 여부를 테스트 하려고 할때, 어떻게 해야 할지 고민을 하지말라고 kafkacat 이 있습니다.
https://github.com/edenhill/kafkacat
edenhill/kafkacat
Generic command line non-JVM Apache Kafka producer and consumer - edenhill/kafkacat
github.com
Ubuntu 와 Windows 에서 설치는
ubuntu 는 Apt 로~~
apt-get install kafkacat
Windows 에서는 아래의 파일로~~
https://ci.appveyor.com/project/edenhill/kafkacat/build/artifacts
AppVeyor
ci.appveyor.com
이렇게 설치한 kafakcat 은 이용하면 Kafka Producer, Kafka Consumer 를 테스트 할 수 있습니다.
Kafka Producer
kafkacat -b localhost:9092 -t new_topic -G kafka -K : -P[옵션 설명]
-b : kafka bootstap 주소
-t : topic 이름
-G : group 이름
-K : Message Keys 구분자
-P : Producer 타입
Kafka Consumer
kafkacat -b localhost:9092 -t new_topic -G kafka -K : -C[옵션 설명]
-b : kafka bootstap 주소
-t : topic 이름
-G : group 이름
-K : Message Keys 구분자
-P : Consumer 타입
요렇게 쉽게~ kafkacat 을 이용해 봅시돠~~:)