본문 바로가기
FrameWork/Kafka

Kafka 명령어

by 태윤2 2022. 6. 26.
  • zokeeper 구동($KAFKA_HOME)
./bin/zookeeper-server-start.sh, ./bin/config/zookeeper.properties
  • Kafka 구동($KAFKA_HOME)
./bin/kafka-server-start.sh(bat), .bin/config/server.properties
  • Kafka Connetor($confluence_HOME) 구동
./bin/connect-distributed.sh ./etc/kafka/connect-distributed.properties
  • 토픽 생성
./bin/kafka-topics.sh --create --topic #{topic_name} --bootstrap-server #{ip}:9092 --partitions 1
  • 토픽 삭제(properties 수정필요)
./bin/kafka-topics.sh --delete --topic #{topic_name} --bootstrap-server localhost:9092
  • 토픽 컨슘
./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic #{topic_name} --from-beginning
  • 토픽 리스트
./bin/kafka-topics.sh --bootstrap-server localhost:9092 --list