forked from MinePing/Final
-
Notifications
You must be signed in to change notification settings - Fork 0
kafka setting
qbsb147 edited this page Mar 20, 2026
·
1 revision
Kafka 4.x에서는 메타데이터 저장을 위해 👉 클러스터 ID 생성 + 로그 디렉토리 초기화 필요
bin\windows\kafka-storage.bat random-uuid👉 출력된 UUID 복사 후
bin\windows\kafka-storage.bat format -t <클러스터ID> -c config\kraft\server.propertiesbin\windows\kafka-server-start.bat config\kraft\server.properties- 에러 없이 실행되면 정상
- 기본 포트: 9092
(로그 출력으로 확인하는 방식이 일반적 → 별도 명령 검증은 환경마다 달라 확실하지 않음)
📌 토픽 생성
bin\windows\kafka-topics.bat --create --topic test-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1📌 Producer 실행
bin\windows\kafka-console-producer.bat --topic test-topic --bootstrap-server localhost:9092📌 Consumer 실행
bin\windows\kafka-console-consumer.bat --topic test-topic --from-beginning --bootstrap-server localhost:9092👉 메시지 입력 → Consumer에 출력되면 정상 🎉
👉 Kafka 4.x부터는 Zookeeper 없이 KRaft 단독 실행 구조