Ez Kafka setup on Confluent

Confluent is a cloud-native, complete, and fully managed service that goes above & beyond Kafka so your best people can focus on delivering value to your business.

Cloned Client project

Docker

FROM ubuntu:18.04RUN  apt-get update -qqy \&& apt-get install -y --no-install-recommends \build-essential \node-gyp \nodejs-dev \libssl1.0-dev \liblz4-dev \libpthread-stubs0-dev \libsasl2-dev \libsasl2-modules \make \python \nodejs npm ca-certificates \&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*WORKDIR /usr/src/appCOPY .env *.js *.json *.md /usr/src/app/RUN npm install -dENV LD_LIBRARY_PATH=/usr/src/app/node_modules/node-rdkafka/build/depsCMD [ "node", "producer.js",  "-f", ".env", "-t", "test1" ]

The .env file

# Required connection configs for Kafka producer, consumer, and adminbootstrap.servers=<SPECIFIED-BY-CONFLUENT>security.protocol=SASL_SSLsasl.mechanisms=PLAINsasl.username=<PROVIDED-BY-CONFLUENT>sasl.password=<<PROVIDED-BY-CONFLUENT>>session.timeout.ms=45000
docker build -t confluent-kafka .
docker run confluent-kafka

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store