회사에서 kafka를 사용하는데, kafka에 대해 잘 몰라서 혼자 공부해보기로 결정했다.
책 apache kafaka 를 참고하고, 안되는 부분은 구글링으로..!
https://www.yes24.com/Product/Goods/59789254
카프카, 데이터 플랫폼의 최강자 - 예스24
데이터 플랫폼의 핵심 컴포넌트로 각광받고 있는, 이벤트 기반 비동기 아키텍처를 위한 고가용성 실시간 분산 스트리밍 솔루션 카프카(Kafka)의 모든 것!국내 최대 모바일 플랫폼 회사인 카카오
www.yes24.com
1. 카프카 설치
카프카 다운로드
방법1) homebrew 로 설치 : 설치는 쉽지만 실행이 잘 안되는듯..
방법2) 해당 링크에 들어가서 tgz파일을 다운받는다
https://www.apache.org/dyn/closer.cgi?path=/kafka/2.8.0/kafka_2.13-2.8.0.tgz
Apache Download Mirrors
The requested file or directory is not on the mirrors. The object is in our archive : https://archive.apache.org/dist/kafka/2.8.0/kafka_2.13-2.8.0.tgz Verify the integrity of the files It is essential that you verify the integrity of the downloaded file us
www.apache.org
터미널로 설치경로로 들어가서 압축해제
$ tar xvf kafka_2.13-2.8.0.tgz
압축해제되면 kafka_2.13-2.8.0 이름의 폴더가 생성된다.
설치된 폴더로 들어가서 zookeeper을 먼저 실행한다
$ cd kafka_2.13-2.8.0
$ bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
zookeeper가 실행 되었다면, kafka를 실행한다
$ bin/kafka-server-start.sh -daemon config/server.properties
잘 실행 되었는지 보려면 netstat -an | grep 2181 으로 확인
$ netstat -an | grep 2181
tcp46 0 0 *.2181 *.* LISTEN
참고
https://www.conduktor.io/kafka/kafka-producer-cli-tutorial/
https://devfoxstar.github.io/mq/kafka-install-and-command-in-mac/