CloudKarafka / go-kafka-example

MIT License
14 stars 11 forks source link

Apache Kafka Producer/Consumer example in Go

One consumer and one producer where the producer send some simple text messages to the consumer.

Getting started

Setup your free Apache Kafka instance here: https://www.cloudkarafka.com

Configuration

These export commands must be run in both of the terminal windows below.

git clone https://github.com/CloudKarafka/go-kafka-example.git
cd go-kafka-example`
go get -u github.com/confluentinc/confluent-kafka-go/kafka
go run consumer.go

Open another terminal window and cd into same directory and run go run producer.go.