Notice
Recent Posts
Recent Comments
Link
celina의 이것저것
[Kafka] produer와 consumer 본문
반응형
전부 [root@localhost bin] 위치에서 실행, kafka/bin
./kafka-topics.sh --bootstrap-server localhost:9092 --create --topic test
=> test라는 이름을 가진 topic을 생성
./kafka-topics.sh --bootstrap-server localhost:9092 --list
=> test가 제대로 생성되었는지 확인
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic test
=> test의 정보 확인(토픽 아이디, 파티션갯수 등등)
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
=>consumer생성
./kafka-console-producer.sh --bootstrap-server localhost:9092 --topic test
=>producer 생성
cd /tmp/kafka-logs
ll
=> 로그파일 볼 수 있음
ls
cd test-0
ls
=> 뭐라고 적혔는지 자세히 볼 수 있음
'대학생활 > 빅데이터' 카테고리의 다른 글
[Hadoop] wordcount (9) | 2024.04.04 |
---|---|
[Hadoop] (0) | 2024.04.02 |
[Hadoop] (0) | 2024.03.28 |
[Kafka] 영화 데이터 전달 (0) | 2024.03.19 |
[Kafka] 카프카 설치 및 켜고끄기 (1) | 2024.03.13 |