Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Guide to setup Kafka with Python in less than 5 minutes

NotificationsYou must be signed in to change notification settings

rawheel/Kafka-Python-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This guide demonstrates a quick setup for working with Kafka and Python using Faust and Docker Compose. You can have Kafka up and running in just a few minutes following these steps.

Step 1: Setting Up Kafka with Docker Compose

  1. Clone thekafka-stack-docker-compose repository:

    git clone https://github.com/conduktor/kafka-stack-docker-compose
  2. Navigate to the repository directory:

    cd kafka-stack-docker-compose
  3. Start Kafka and ZooKeeper containers:

    docker compose -f zk-single-kafka-single.yml up

Step 2: Running the Python Kafka Setup

  1. Clone this project:

    git clone https://github.com/rawheel/Kafka-Python-Example.git
  2. Navigate to the project directory:

    cd Kafka-Python-Example
  3. Install project dependencies:

    pip install -r requirements.txt
  4. Start a Faust worker:

    faust -A worker worker -l info
  5. To produce a Kafka message using the Faust command-line tool, run:

    faust -A worker send hello_world'Hello Folks, Raheel Here!'
  6. To produce kafka messages using python code

    python producer.py

About

A Guide to setup Kafka with Python in less than 5 minutes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp