Skip to content

This tutorial provides a step-by-step guide to setting up a Kafka producer and consumer using Docker containers.

Notifications You must be signed in to change notification settings

Aakashbhardwaj27/kafkaTutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version npm pre-release version Build Status Slack Channel


Logo

KafkaJS

A modern Apache Kafka® client for Node.js based Example
Get Started »

Read the Docs

This is a node.js and Kafaka.js based implementation

Kafka Tutorial: Producer and Consumer Setup with Docker

This tutorial provides a step-by-step guide to setting up a Kafka producer and consumer using Docker containers. Apache Kafka is a powerful distributed event streaming platform commonly used for building real-time data pipelines and streaming applications.

Prerequisites

Before you begin, ensure you have the following:

Setting up the Kafka Environment

export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1)
docker-compose up

Project Structure

  • Consumer: Used to consume the messages
  • Producer: Used to produce the messages

Navigate to Producer

cd producer
npm install
npm start

Navigate to Consumer

cd consumer
npm install
npm start

About

This tutorial provides a step-by-step guide to setting up a Kafka producer and consumer using Docker containers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published