<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by OrdinaryMan on Medium]]></title>
        <description><![CDATA[Stories by OrdinaryMan on Medium]]></description>
        <link>https://medium.com/@jongyoungcha?source=rss-4c4856a9369b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9GRmTkR5d_mR7k4O.</url>
            <title>Stories by OrdinaryMan on Medium</title>
            <link>https://medium.com/@jongyoungcha?source=rss-4c4856a9369b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:15:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jongyoungcha/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Apache Kafka Confluent Platform Community Features 설치 / Producer, Consumer 생성(OSX)]]></title>
            <link>https://jongyoungcha.medium.com/test-d327f947a761?source=rss-4c4856a9369b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d327f947a761</guid>
            <dc:creator><![CDATA[OrdinaryMan]]></dc:creator>
            <pubDate>Sat, 05 Jun 2021 12:15:27 GMT</pubDate>
            <atom:updated>2021-06-22T07:07:52.548Z</atom:updated>
            <content:encoded><![CDATA[<p>이번에 사내에서 새로운 프로젝트를 진행하는데 기존과 다른 새로운 방식으로 서비스를 구현하려고 합니다. protobuf 메시지와 메시지 큐를 이용해서 message producer / consumer를 MSA와 같이 접목해서 구현하려고 하고 있습니다. 메시지 큐는 Kafka를 이용하기로 하였고, 이로인해서 Apache Kafka를 Research 하게 되었습니다. 보통 카프카를 설치하는데 배포판이 여러개이기 때문에 많은분들은 어떤 배포판을 설치할지 어려워 하시는 분들이 많습니다. 그런분들을 위해서 어떤 Kafka 배포판을 설치해야되는지 설명하고 그 방법에 대해서 설명해드리겠습니다. (결론부터 말씀드리면 Non-Comercial로 사용하기 최적의 버전은 Confluent Kafka Community Features 버전을 설치하셔서 사용하면 됩니다.)</p><h4>Kafka의 배포판</h4><p>Kafka는 여러가지 배포판이 존재합니다.<br>일반적으로 각 벤더 별 배포판은 아파치 커뮤니티 버전이 새로 릴리즈 되면 커뮤니티 배포판과 함께 추가적인 자사의 유틸리티를 포함해서 배포됩니다.</p><ul><li>커뮤니티 버전 (<a href="http://kafka.apache.org/">http://kafka.apache.org</a>)</li><li>컨플루언트 플랫폼 (<a href="http://www.confluent.io/">http://www.confluent.io</a>)</li><li>클라우데라 (<a href="http://www.cloudera.com/">http://www.cloudera.com</a>)</li><li>호튼웍스 (<a href="http://hortonworks.com/">http://hortonworks.com</a>)</li></ul><p>여기서 주목할 만한 프로젝트는 <br>커뮤니티 버전과 Confluent 플랫폼 입니다.</p><p>Confluent 플랫폼은 링크드인에서 Kafka를 만들었던 엔지니어들이 나와서 설립한 회사인 Confluent에서 만든 Kafka 배포판 입니다.</p><p>실제로 이 글에서 구축하려는 Kafka 시스템도 Confluent Kafka Community Features 입니다.<br>Apache Kafka보다 Confluent Kafka Community Features를 사용하면 좋은점은 아래와 같습니다.</p><ul><li><strong><em>Confluent Kafka는 Apache Kafka의 버그가 Fix된 고도화된 버전</em></strong><br> Confluent라는 회사가 기존에 Kafka를 초기부터 개발했던 사람들이 모여서 만든 회사이다 보니 Apache Kafka 소스코드에 기여를 많이 하고 있습니다. 그러다 보니 Apache Kafka에서 혹시 문제점이 발견되면 자사의 솔루션에 버그를 수정해서 적용하고 있습니다.</li><li><strong><em>여러가지 유용한 카프카 Extension들을 사용할 수있다.<br></em></strong>Confluent에서 만든 여러가지 Apache 카프카 Extension들을 사용 할 수 있습니다. 대표적인 것으로 Kafka Connect, Schema Registry 등이 있습니다.<br><a href="https://www.confluent.io/hub/">https://www.confluent.io/hub</a> 에서 community extension들을 찾아볼 수 있습니다.</li><li><strong><em>Confluent Kafka와 Apache Kafka는 동일한 API 인터페이스<br></em></strong>혹시나 Confluent Kafka를 쓰다가 다시 Apache Kafka로 다시 바꾼다고 해도 문제가 되지 않습니다. 공통으로 지원하는 부분의 API 인터페이스는 동일하기 때문에 개발된 소스코드를 변경할 필요가 없습니다.</li></ul><p>아래의 링크에서 Confluent Platform과 매칭되는 Apache Kafka Version을 도식화했습니다.<br><a href="https://docs.confluent.io/platform/current/installation/versions-interoperability.html">https://docs.confluent.io/platform/current/installation/versions-interoperability.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*pa2fHK0slm2EmoXwmvJbwA.png" /></figure><p>Confluent Platform에서 제공하고 있는 모듈들은 아래와 같은 라이선스 정책을 가지고 있습니다.</p><p><strong><em>Open Source Features</em></strong></p><ul><li>Apache Kafka</li><li>Apache ZooKeeper</li><li>Non-Java Clients</li><li>Ansible Playbooks</li></ul><p><strong><em>Confluent Community Features</em></strong></p><ul><li>Pre-built Connectors</li><li>REST Proxy</li><li>KSQL</li><li>Schema Registry</li></ul><p><strong><em>Commercial Features</em></strong></p><ul><li>Pre-built Connectors</li><li>Control Center</li><li>Operator (k8s)</li><li>….</li></ul><p>우선 Opens Source Features 와 Confluent Community Features는 상업용 라이선스 없이 사용할 수 있습니다. <br>Open Source Features는 Apache Kafka 커뮤니티에서 제공하고 있는 기본적인 라이선스를 따라갑니다.<br> Confluent Community Features는 컨플루언트 커뮤니티에서 좀 더 원활한 Kafka 서비스를 이용하기 위해서 추가적으로 만든 모듈들인데, 카프카 커뮤니티에 기여하기 위해서 이 부분은 비상업용 라이언스로 배포했습니다.<br> Commercial Features 부분은 실제로 돈을 주고 Kafka를 사용해야 합니다.향후 필요하면 돈을주고 사용하면됩니다.</p><p>결론은 Confluent 카프카 배포판을 이용하면 Apache 커뮤니티 버전 + @ 의 기능을 사용 할 수 있기 때문에 우리가 컨플루언트 카프카를 이용해야 하는 이유입니다.</p><p>또 Confluent Cloud Service를 이용해서 SaaS 사용 할 수 있고, 그렇지 않다면 원하는 곳에 직접 설치해서 On-Premise 형식으로 사용 할 수 있습니다.</p><p>여기서는 OSX Local에 직접 플랫폼을 설치할 것 입니다.</p><h4>컨플루언트 플랫폼 free community features 다운로드 및 구동 (Docker)</h4><blockquote>컨플루언트 플랫폼 커뮤니티 배포판을 설치하는 방법 중에서 두가지 방법이 있습니다. 한가지는 Local에 직접 설치하는 방법과 Docker Compose를 이용하는 방법 입니다. 저는 이 둘중에서 Docker Compose를 이용해서 설치하는 방법을 추천드립니다. <br>왜냐하면 설치하기가 쉽고 기존에 시스템에 레거시 설정으로 인해서 예외사항이 발생할 수 있는 가능성이 현저히 적기 때문입니다.</blockquote><blockquote><strong>* 컨플루언트 Docker 파일 다운로드</strong></blockquote><blockquote>$ mkdir confluent_docker</blockquote><blockquote>$ cd confluent_docker</blockquote><blockquote>$ curl --silent --output docker-compose.yml \<br> <a href="https://raw.githubusercontent.com/confluentinc/cp-all-in-one/6.2.0-post/cp-all-in-one-community/docker-compose.yml">https://raw.githubusercontent.com/confluentinc/cp-all-in-one/6.2.0-post/cp-all-in-one-community/docker-compose.yml</a></blockquote><blockquote><strong>* 컨플루언트 커뮤니티플랫폼 구동</strong></blockquote><blockquote>$ docker-compose up -d</blockquote><blockquote>confluent_docker docker-compose up -d<br>Starting zookeeper … done<br>Starting broker … done<br>Starting schema-registry … done<br>Starting connect … done<br>Starting rest-proxy … done<br>Starting ksqldb-server … done<br>Starting ksqldb-cli … done<br>Starting ksql-datagen … done</blockquote><blockquote>$ docker-compose ps<br> Name Command State Ports <br>broker /etc/confluent/docker/run Up 0.0.0.0:29092-&gt;29092/tcp, 0.0.0.0:9092-&gt;9092/tcp, 0.0.0.0:9101-&gt;9101/tcp<br>connect /etc/confluent/docker/run Exit 137 <br>ksql-datagen bash -c echo Waiting for K … Up <br>ksqldb-cli /bin/sh Up <br>ksqldb-server /etc/confluent/docker/run Up 0.0.0.0:8088-&gt;8088/tcp <br>rest-proxy /etc/confluent/docker/run Up 0.0.0.0:8082-&gt;8082/tcp <br>schema-registry /etc/confluent/docker/run Up 0.0.0.0:8081-&gt;8081/tcp <br>zookeeper /etc/confluent/docker/run Up 0.0.0.0:2181-&gt;2181/tcp, 2888/tcp, 3888/tcp</blockquote><h4>컨플루언트 카프카 토픽 생성 / producer, consumer 테스트</h4><blockquote><strong>* 토픽 생성 (users, pageview)</strong></blockquote><blockquote>$ docker-compose exec broker kafka-topics \<br> — create \<br> — bootstrap-server localhost:9092 \<br> — replication-factor 1 \<br> — partitions 1 \<br> — topic users</blockquote><blockquote><strong>* 샘플 데이터 생성 및 전송</strong></blockquote><blockquote>CLI를 통해서 uses 토픽에 대한 테스트 event messge를 생성하고 consumer를 통해서 읽어보도록 하겠습니다.</blockquote><blockquote>$ docker exec -it broker kafka-console-producer --bootstrap-server localhost:9092 --topic users<br>&gt; 1<br>&gt; 2<br>&gt; 3<br>&gt; 4<br>&gt; Ctrl-D</blockquote><blockquote>$ docker exec -it broker kafka-console-consumer --bootstrap-server localhost:9092 --topic users --from-beginning<br>1<br>2<br>3<br>4</blockquote><h4>컨플루언트 플랫폼 free community features 다운로드 및 구동 (Local)</h4><blockquote>Confluent 좀더 상세하게 설정하기 쉽도록 Local에 설치 하는 방법에 대해서도 설명하려고 합니다.</blockquote><blockquote>컨플루언트 다운로드 링크입니다.</blockquote><blockquote><a href="https://www.confluent.io/installation">https://www.confluent.io/installation</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aU1ScPQlknh3ENqWUjSSzQ.png" /></figure><blockquote>해당 링크에서 Community 세션에 있는 파일을 다운로드 하도록 합니다.</blockquote><blockquote>다운로드 받고 나서 디렉토리 구조를 보면 아래와 같습니다.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*u-mlg_xPRyiDIBmNpIGhTA.png" /></figure><blockquote><strong>* Confluent 홈 디렉토리 설정 및 환경병수 설정</strong></blockquote><blockquote>그리고 아래와 같이 환경변수를 지정해서 Confluent 플랫폼의 HOME 디렉토리를 설정하고 실행 파일들을 PATH에 추가합니다.</blockquote><blockquote>export CONFLUENT_HOME=&lt;path-to-confluent&gt;<br>export PATH=”${CONFLUENT_HOME}/bin:$PATH”</blockquote><blockquote><strong>* confluent-hub-client 설치</strong></blockquote><blockquote>confluent-hub를 설치합니다. confluent-hub는 여러가지 confluent community kafka extension들을 설치하는데 사용됩니다.</blockquote><blockquote>$ brew install --cask confluent-hub-client<br>$ confluent-hub</blockquote><blockquote>usage: confluent-hub &lt;command&gt; [ &lt;args&gt; ]</blockquote><blockquote>Commands are:<br> help Display help information<br> install install a component from either Confluent Hub or from a local file</blockquote><blockquote>See ‘confluent-hub help &lt;command&gt;’ for more information on a specific command.</blockquote><blockquote><strong>* confluent CLI 설치</strong></blockquote><blockquote>curl을 이용해서 confluent CLI를 $CONFLUENT_HOME/bin에 설치해줍니다.<br>$ curl -L --http1.1 <a href="https://cnfl.io/cli">https://cnfl.io/cli</a> | sh -s -- -b $CONFLUENT_HOME/bin</blockquote><blockquote><strong>* confluent platform (local) 구동</strong></blockquote><blockquote>$ confluent local services start<br>The local commands are intended for a single-node development environment only,<br>NOT for production usage. <a href="https://docs.confluent.io/current/cli/index.html">https://docs.confluent.io/current/cli/index.html</a></blockquote><blockquote>Using CONFLUENT_CURRENT: /var/folders/r1/bynzc7t51jdbz0hhfp24h1wc0000gn/T/confluent.412672<br>Starting ZooKeeper<br>ZooKeeper is [UP]<br>Starting Kafka<br>Kafka is [UP]<br>Starting Schema Registry<br>Schema Registry is [UP]<br>Starting Kafka REST<br>Kafka REST is [UP]<br>Starting Connect<br>Connect is [UP]<br>Starting ksqlDB Server<br>ksqlDB Server is [UP]</blockquote><blockquote><strong>* consumer / producer message 테스트<br>$ </strong>kafka-console-producer --bootstrap-server localhost:9092 --topic users<br>&gt; 1<br>&gt; 2<br>&gt; 3<br>&gt; 4<br>&gt; Ctrl-D</blockquote><blockquote>$ kafka-console-consumer --bootstrap-server localhost:9092 --topic users --from-beginning<br>1<br>2<br>3<br>4</blockquote><p>로컬 버전도 이상없이 입력한 메시지를 가져오는 것을 확인 할 수 있습니다.</p><p>여기까지 OSX 내에서 kafka confluent 플랫폼 커뮤니터 버전 환경 설정이었습니다.</p><p>다음에는 golang과 grpc message를 이용해서 consumer /producer sample을 만들어 보도록 하겠습니다.</p><p>감사합니다.</p><h4>참고자료</h4><ul><li><a href="http://kafka.apache.org/">http://kafka.apache.org</a></li><li><a href="https://www.cesaro.io/post/confluent-platform-vs-apache-kafka-what-are-the-differences">https://www.cesaro.io/post/confluent-platform-vs-apache-kafka-what-are-the-differences</a></li><li><a href="https://docs.confluent.io/platform/current/quickstart/cos-quickstart.html">https://docs.confluent.io/platform/current/quickstart/cos-quickstart.html</a></li><li><a href="https://docs.confluent.io/platform/current/quickstart/cos-docker-quickstart.html">https://docs.confluent.io/platform/current/quickstart/cos-docker-quickstart.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d327f947a761" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[test story]]></title>
            <link>https://jongyoungcha.medium.com/test-story-a2cc2833df12?source=rss-4c4856a9369b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2cc2833df12</guid>
            <dc:creator><![CDATA[OrdinaryMan]]></dc:creator>
            <pubDate>Mon, 21 May 2018 05:45:57 GMT</pubDate>
            <atom:updated>2018-05-21T05:45:57.825Z</atom:updated>
            <content:encoded><![CDATA[<p>where is this post going?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2cc2833df12" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>