module
0.0.0-20221119033745-3899aff23f8b
Repository: https://github.com/netrebel/kafka-with-go.git
Documentation: pkg.go.dev
# README
kafka-with-go
https://medium.com/swlh/apache-kafka-with-golang-227f9f2eb818
How to run
docker-compose up -d
to run kafkamake build
to build the producer and consumermake producer
to run the producer (starts HTTP server)protoc *.proto --go_out=producer
to compile protobuf filecurl --location --request POST 'localhost:3000/api/v1/account-delete' --header 'Content-Type: application/json' --data-raw '{ "userId":"2016fe16-4e40-4b3c-87a2-3675ff1f8d97", "reason":"deleted" }'
to send a message to the producermake consumer
to run the consumer
Protobuf setup
# install protoc
brew install protobuf
# install go protobuf
go get google.golang.org/protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
# complie protobuf
protoc *.proto --go_out=producer