Skip to content

Demo Produce and Consume Message using Golang and Apache Kafka

Notifications You must be signed in to change notification settings

musobarlab/go-kafka-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Demo Produce and Consume Message using Golang and Apache Kafka

TODO

  • Consumer connect using Zookeeper

Getting started

  • Start Kafka and Zookeeper
$ docker-compose up
  • Start Producer

    install dependencies

$ glide install
$ go build
$ ./producer
  • Send Message to Kafka topic
curl -X POST \
http://localhost:3000/api/send \
-H 'content-type: application/json' \
-d '{
    "from": "Wuriyanto",
        "content":{
            "header": "This is Message 2",
            "body": "Hello Kafka"
        }
    }'
  • Start Consumer

    install dependencies

$ glide install
$ go build
$ ./consumer

Releases

No releases published

Packages

No packages published