티스토리 뷰
kafka 기초 학습을 위해서 우선 아래 사이트에서 kafka 설치를 한다.
https://kafka.apache.org/quickstart
Apache Kafka
Apache Kafka: A Distributed Streaming Platform.
kafka.apache.org
위에 예제 중에 consumer, publisher sh로 학습을 해도 되지만 이미 많은 example 들이 있는 github repository 들이 있다.
아래 kafka github에 있는 examples 들을 받아서 내부 설정등을 바꿔가며 확인한다.
https://github.com/apache/kafka.git
GitHub - apache/kafka: Mirror of Apache Kafka
Mirror of Apache Kafka. Contribute to apache/kafka development by creating an account on GitHub.
github.com
confluentinc example
https://github.com/confluentinc/examples
GitHub - confluentinc/examples: Apache Kafka and Confluent Platform examples and demos
Apache Kafka and Confluent Platform examples and demos - GitHub - confluentinc/examples: Apache Kafka and Confluent Platform examples and demos
github.com
confluent java code example
Java: Code Example for Apache Kafka® | Confluent Documentation
Home Platform Get Started with Kafka Videos, Demos, and Reading Material Confluent Cloud Examples Index Code Examples for Apache Kafka® Java: Code Example for Apache Kafka® In this tutorial, you will run a Java client application that produces messages t
docs.confluent.io
kafka stream은 확실히 예제코드를 보면서 익히는게 도움이 많이 된다.
https://docs.confluent.io/platform/current/streams/code-examples.html#streams-code-examples
Streams Code Examples | Confluent Documentation
Home Platform ksqlDB and Kafka Streams Kafka Streams Streams Code Examples If you’re new to Kafka Streams, here is a curated list of resources to get you started.
docs.confluent.io
topic 생성 등 명령어들을 치기 귀찮으면 로컬환경에 CMAK(Cluster Manager for Apache Kafka) 를 설치한다.
GitHub - yahoo/CMAK: CMAK is a tool for managing Apache Kafka clusters
CMAK is a tool for managing Apache Kafka clusters. Contribute to yahoo/CMAK development by creating an account on GitHub.
github.com
README.md를 확인해서 application.conf zookeeper 주소 변경하고 아래 명령어 실행한다.
./sbt clean dist
멈춰있는 듯 하지만 조금 기다리면 완료되고 아래와 같이 target 디렉토리 밑에 cmak-version.zip 으로 빌드된 파일이 생성됨.
적당한 위치에 옮겨서 아래 명령어로 띄우고 브라우저에서 localhost:9000 으로 접속한다.
bin/cmak
kafka 학습을 위한 준비는 모두 끝 ^^