Cloudkarafka


클라우드에서 관리되는 apache kafka 서버로, 카프카의 설정, 실행 및 확장 등을 자동화시킨 서비스를 제공한다.

 

cloud에 대한 자세한 내용은 아래 아파치 카프카의 공식 홈페이지에서 확인할 수 있다.

https://www.cloudkarafka.com/docs/index.html

 

Documentation - CloudKarafka, Apache Kafka Message streaming as a Service

Documentation Getting started CloudKarafka are managed Apache Kafka servers in the cloud. Kafka is a distributed publish-subscribe messaging systems that is designed to be fast, scalable, and durable. It's an open-source message broker written in Scala and

www.cloudkarafka.com

 

 

 

cloudkarafka getting start - python


툴은 Visual Studio를 사용

 

1. 원하는 디렉터리 경로에서 아래 명령어를 입력

git clone https://github.com/CloudKarafka/python-kafka-example.git

 

 

2. visual studio에서 해당 프로젝트 오픈

 

 

3. 환경변수 설정을 위해서 cloudkarafka의 왼쪽 메뉴바의 [Detail] 클릭

Connection details의 Download를 클릭하여 instance 정보가 담긴 txt 파일을 다운로드

txt 파일 내용

 

 

4. 3번의 txt파일의 정보를 가지고, 터미널로 환경변수 설정

~ export CLOUDKARAFKA_BROKERS="rocket-01.srvs.cloudkafka.com:9094,rocket-02.srvs.cloudkafka.com:9094,rocket-03.srvs.cloudkafka.com:9094"
~ export CLOUDKARAFKA_USERNAME="it5v25et"
~ export CLOUDKARAFKA_PASSWORD="xDjmU_mpuzRcoux8pjFkPJAmgutBU0ar"
~ export CLOUDKARAFKA_TOPIC="it5v25et-testTopic"

// TOPIC은 "username-내가정한인스턴스이름"

 

 

5. 환경변수 설정을 끝내고 터미널로 consumer.py 실행

~ python consumer.py

 

 

6. 또 다른 Terminal을 열고 producer.py 실행

~ python producer.py

 

 

7. cloudkarafka에서 producer에서 메시지 적재

 

메시지 적재가 된 것을 Terminal에서 확인할 수 있다.

 

터미널 화면

 

'Database > Kafka' 카테고리의 다른 글

Kafka message(data) 보관주기 설정  (0) 2020.07.30
Kafka QuickStart  (0) 2020.07.30
centOS 8에 Kafka 설치  (0) 2020.07.28
[MacOS] Cloudkarafka로 kafka 맛보기  (1) 2020.07.24

 

Cloudkarafka


귀여운 오리

클라우드에서 관리되는 apache kafka 서버로, 카프카의 설정, 실행 및 확장 등을 자동화시킨 서비스를 제공한다.

 

cloud에 대한 자세한 내용은 아래 아파치 카프카의 공식 홈페이지에서 확인할 수 있다.

https://www.cloudkarafka.com/docs/index.html

 

Documentation - CloudKarafka, Apache Kafka Message streaming as a Service

Documentation Getting started CloudKarafka are managed Apache Kafka servers in the cloud. Kafka is a distributed publish-subscribe messaging systems that is designed to be fast, scalable, and durable. It's an open-source message broker written in Scala and

www.cloudkarafka.com

 

 

 

Cloudkarafka 시작하기


1. 홈페이지에 접속한 뒤 초록색 버튼 클릭 - https://www.cloudkarafka.com/ 

 

 

2. 이 포스팅에서 사용할 것은 이 귀여운 DEVELOPER DUCK! 

[Try a Developer Duck]을 클릭 -> 회원가입 진행 -> 로그인

 

 

3. 로그인하면 아래와 같은 창이 보이고, Name에는 자신이 원하는 Instance 이름을 입력 -> [Select Region] 클릭

(위의 노란색 알림은 무시해도 상관 없음)

 

 

4. data 센터의 위치 선택 -> [review] 클릭

버지니아는 에러나서 EU-WEST-1로 선택

 

 

5. [create instance] 클릭

 

 

6. instance가 생성된 것을 확인 (testinstance)

 

 

7. 방금 만든 인스턴스를 클릭하면 아래와 같이 정보를 확인할 수 있다. 

 

 

 

Consumer & Producer 사용해보기 (message 적재)


이번 포스팅은 producer를 이용해서 메세지를 적재하고, consumer가 소비하는 것을 확인하는 것이 목표!!

 

1. 왼쪽 메뉴바의 [TOPICS]를 클릭하여 토픽에 대한 정보를 입력 -> [create] 클릭

(간단한 테스트만 진행할 것이기 때문에, partitions와 replicas를 모두 1로 정함)

 

 

2. 왼쪽 메뉴바의 [BROWSER] 클릭 -> topic name을 Consumer, Producer에 입력

 

 

 

3. Producer 에 적재하고 싶은 Message를 작성하여 [Produce] 클릭하면 Consumer에서 확인할 수 있다

 

4. [Consume] 클릭하면 메세지를 소비

소비하기 전
소비 후

 

 

 

'Database > Kafka' 카테고리의 다른 글

Kafka message(data) 보관주기 설정  (0) 2020.07.30
Kafka QuickStart  (0) 2020.07.30
centOS 8에 Kafka 설치  (0) 2020.07.28
[MacOS] Cloudkarafka와 python를 연동해서 메세지 전송하기  (0) 2020.07.25

+ Recent posts