Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 788 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 788 Bytes

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