Installation:
Example installation for development
- Create a src directory in your home folder $HOME/src
- Set the environment variable
- export GOPATH=$HOME
- cd $HOME/src
- git clone https://github.com/vikascoupa/MQPrototype
- cd $HOME/src/MQPrototype
Compilation:
- go install MQPrototype/producer
- go install MQPrototype/consumer
Running:
- You need to have kafka and zookeeper running as a prerequisite(see below)
- $HOME/bin/producer -topic=test -value=test-message -brokers=localhost:9092
- $HOME/bin/consumer -topic=test -brokers=localhost:9092
Kafka Setup:
Start by downloading the Kafka tarball from here - http://kafka.apache.org/downloads.html untar it and you're ready to go.
Start Zookeeper: bin/zookeeper-server-start.sh config/zookeeper.properties
Now start the Kafka server: bin/kafka-server-start.sh config/server.properties