Go client example for nsq
- Create docker containers
docker-compose up -d --build
- The examples use
go-nsq
so get go get it
go get -u -v github.com/bitly/go-nsq
- Start the consumer in a separate terminal, which waits for messages to be published
go run command/consumer_example.go
- Start the producer in a separate terminal, which will create 1000 messages
go run command/producer.go