Skip to content

peeush-agarwal/kafka-go-getting-started

Repository files navigation

Tutorial on Apache Kafka using Golang

Apache Kafka is an open-source event streaming platform, used for publishin and processing events at high-throughput.

Running Kafka cluster in local machine

docker-compose up -d

Create a topic in the Kafka broker

docker compose exec broker kafka-topics --create --topic purchases --boostrap-server localhost:9092 --replication-factor 1 --partitions 1

Build Producer

go build -o out/producer util.go producer.go

Run Producer

./out/producer getting-started.properties

Build Consumer

go build -o out/consumer util.go consumer.go

Run Consumer

./out/consumer getting-started.properties

Enter Ctrl+C to exit

About

Tutorial to get started with Apache Kafka and Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages