/nsq-goclient

Go client example for nsq

Primary LanguageGo

nsq-goclient

Go client example for nsq

Setup

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