빅데이터/nosql
kafka console consumer 여러 토픽 컨슘하기
AndersonChoi
2021. 2. 25. 15:47
kafka console consumer를 사용하다보면 --topic으로 토픽을 컨슈밍 하기도 하지만 여러 토픽 또는 정규식을 사용해서 확인해보고 싶을 때가 있다. 이 때 --whitelist를 사용하면 된다.
Example) hello-topic과 hello.topic 토픽을 컨슈밍 하고 싶다면
$ ./kafka-console-consumer.sh --bootstrap-server localhost:9092 --whitelist 'hello-topic|hello.topic'
Example2) 모든 토픽을 컨슈밍 하고 싶다면
$ ./kafka-console-consumer.sh --bootstrap-server localhost:9092 --whitelist '.*'
반응형