
kcat은 Apache Kafka에 비 JVM 기반 생산자 및 소비자 기능을 제공하는 도구입니다.
현재 테스트 서버에 구축 중이며 테스트가 완료되었습니다.
케이캣 명령어
주제에 데이터 보내기(제조업체 테스트)
kcat -P -b localhost:9092 -t test

주제 데이터 확인(소비자)
kcat -b localhost:9092 -t test -C

키 값 데이터 촬영(제조업체 테스트)
kcat -b localhost:29092 -t test -P -K :

파일 데이터 기록
kcat -b localhost:29092 -t test -P -K: msg.txt
데이터를 특정 파티션으로 촬영
kcat -b localhost:29092 -t test -P -p 1

특정 파티션 데이터 확인
kcat -b localhost:29092 -t test -C -p 1

모든 메시지 보내기 및 받기
kcat -b localhost:29092 -t test -P
kcat -b localhost:29092 -t test -C

n개의 메시지만 확인
kcat -b localhost:29092 -t test -C -c 2

특정 오프셋 메시지 찾기
kcat -b localhost:29092 -t test -C -o 1
(오프셋 값을 음수로 지정하면 끝에서부터 메세지를 가져옴)
kcat -b localhost:29092 -t test -C -o -2
출력 형식을 변경하여 데이터 확인
kcat -b localhost:29092 -t test -C -f '\nKey (%K bytes): %k\t\nValue (%S bytes): %s\n\tPartition: %p\tOffset: %o\n--\n'
메타데이터 검색
kcat -L -b localhost:29092

