가. 설치 파일 다운로드

다운로드URL : https://kafka.apache.org/quickstart



다운로드

Last login: Thu Jun 7 10:31:19 2018 from 116.122.223.193
[sooabia@docker-registry ~]$ wget http://apache.mirror.cdnetworks.com/kafka/1.1.0/kafka_2.11-1.1.0.tgz
--2018-06-07 14:49:28-- http://apache.mirror.cdnetworks.com/kafka/1.1.0/kafka_2.11-1.1.0.tgz
Resolving apache.mirror.cdnetworks.com (apache.mirror.cdnetworks.com)... 14.0.101.165
Connecting to apache.mirror.cdnetworks.com (apache.mirror.cdnetworks.com)|14.0.101.165|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56969154 (54M) [application/x-gzip]
Saving to: ‘kafka_2.11-1.1.0.tgz’

100%[===================================================================================================================================================================================================>] 56,969,154 7.86MB/s in 6.9s

2018-06-07 14:49:41 (7.83 MB/s) - ‘kafka_2.11-1.1.0.tgz’ saved [56969154/56969154]

[sooabia@docker-registry ~]$

[sooabia@docker-registry ~]$ tar xvfz kafka_2.11-1.1.0.tgz 

[sooabia@docker-registry ~]$ ll
drwxr-xr-x 6 sooabia sooabia 89 3월 24 07:54 kafka_2.11-1.1.0
-rw-rw-r-- 1 sooabia sooabia 56969154 3월 28 21:05 kafka_2.11-1.1.0.tgz
[sooabia@docker-registry ~]$ mv kafka_2.11-1.1.0 kafka


나. 서버 시작

A. Zookeeper 서버 시작

Zookeeper 서버 시작

[sooabia@docker-registry kafka]$ bin/zookeeper-server-start.sh config/zookeeper.properties

B. Kafka 서버 시작

Kafka 서버 시작

[sooabia@docker-registry kafka]$ bin/kafka-server-start.sh config/server.properties


다. Topic 만들기

단일 파티션과 하나의 복제본으로 "test"라는 Topic을 만듭니다.

Topic 만들기

[sooabia@docker-registry kafka]$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

Created topic "test".


<<Topic List 확인>>

[sooabia@docker-registry kafka]$ bin/kafka-topics.sh --list --zookeeper localhost:2181

test


라. Message 전송

[sooabia@docker-registry kafka]$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
>This is message.
>This is another message.
>


마. Consumer 시작

[sooabia@docker-registry kafka]$ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
This is message.
This is another message.


  • No labels

1 Comment

  1. Anonymous

    Relatively small amounts of intrapartum and postpartum blood loss can result in profound hypovolemia and shock in these patients, who already have compromised blood volumes priligy and cialis together
    1. You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.