Obsidian/Recognition/Programing/Kafka(AMQP)/Kafka Windows 실행.md

2.5 KiB


# zookeeper server 실행
bin\windows\zookeeper-server-start.bat config\zookeeper.properties

# zookeeper server 실행 확인
netstat -na | findstr "2181"


# kafka server 실행
bin\windows\kafka-server-start.bat config\server.properties

# kafka server 실행 확인
netstat -na | findstr "9092"

# kafka topic 생성하기
# bin\windows\kafka-topics.bat --create --bootstrap-server 카프카 접속주소:카프카 포트 --topic 카프카 토픽이름
ex)
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --topic dev-topic

# kafka topic 생성확인
# bin\windows\kafka-topics.bat --list --bootstrap-server 카프카 접속주소:카프카 포트
ex)
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

# zookeeper server 종료
bin\windows\zookeeper-server-stop.bat


# kafka server 종료
bin\windows\kafka-server-stop.bat

# kafdrop 실행
D:\JAVA\jdk-18.0.2\bin\java --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -jar kafdrop/kafdrop-4.0.1.jar --kafka.brokerConnect=localhost:9092

  • windows kraft

# zookeeper server 실행
bin\windows\zookeeper-server-start.bat config\zookeeper.properties

bin\windows\zookeeper-server-start.bat config\kraft\zookeeper.properties

# zookeeper server 실행 확인
netstat -na | findstr "2181"


# kafka server 실행
bin\windows\kafka-server-start.bat config\server.properties

bin\windows\kafka-server-start.bat config\kraft\server.properties

bin\windows\kafka-storage.bat random-uuid
8vVw8BXyTKejURskMuC0xw

bin\windows\kafka-storage.bat format -t IDio-YJlQkqWjcpbrWQgUw -c config\kraft\server.properties

bin\windows\kafka-server-start.bat config\kraft\server.properties

# kafka server 실행 확인
netstat -na | findstr "9092"

# kafka topic 생성하기
# bin\windows\kafka-topics.bat --create --bootstrap-server 카프카 접속주소:카프카 포트 --topic 카프카 토픽이름
ex)
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --topic dev-topic

# kafka topic 생성확인
# bin\windows\kafka-topics.bat --list --bootstrap-server 카프카 접속주소:카프카 포트
ex)
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

# zookeeper server 종료
bin\windows\zookeeper-server-stop.bat


# kafka server 종료
bin\windows\kafka-server-stop.bat

# kafdrop 실행
D:\JAVA\jdk-18.0.2\bin\java --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -jar kafdrop/kafdrop-4.0.1.jar --kafka.brokerConnect=localhost:9092


bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic TestTopic