Obsidian/Recognition/Programing/Kafka(AMQP)/Kafka 명령어.md

35 lines
1.3 KiB
Markdown
Raw Normal View History

2023-09-15 08:52:43 +00:00
- topics 상태확인
> kafka-topics --zookeeper 10.200.31.8:2181 --describe
2023-10-04 01:04:04 +00:00
-- 컨슈머 그룹 조회
/bin/kafka-consumer-groups --bootstrap-server localhost:9091 --list
-- 토픽 리스트
/bin/kafka-topics --list --bootstrap-server localhost:9091 --exclude-internal
-- 토픽 상세 조회
/bin/kafka-topics --bootstrap-server localhost:9091 --topic ai.analyze.video --describe
[value 형태로 데이터를 받음]
/bin/kafka-console-consumer --bootstrap-server localhost:9091 --topic ai.analyze.video --from-beginning
/bin/kafka-console-consumer --bootstrap-server localhost:9091 --topic ic.tracking.fusion.bypass --from-beginning
/home/admin/SACP-INSTALL/
# kafka topic 생성
./kafka-topics --bootstrap-server localhost:19092 --create --topic fastcampus --partitions 20 --replication-factor 3
# kafka에 생성된 토픽 리스트 확인
./kafka-topics --bootstrap-server localhost:19092 --list
# 특정 토픽의 파티션 수, 리플리카 수 등의 상세정보 확인
./kafka-topics --describe --bootstrap-server localhost:19092 --topic fastcampus
# kafka 콘솔 컨슈머 실행
./kafka-console-consumer --bootstrap-server localhost:19092 --topic fastcampus --from-beginning
# kafka 콘솔 프로듀서 실행
./kafka-console-producer --bootstrap-server localhost:19092 --topic fastcampus