项目作者: kecci

项目描述 :
Comparison of Nsq Producer & Consumer in Go
高级语言: Go
项目地址: git://github.com/kecci/go-nsq-compare.git
创建时间: 2020-12-19T04:01:21Z
项目社区:https://github.com/kecci/go-nsq-compare

开源协议:

下载


go-nsq-compare

Install & Run nsq daemon with Dockerfile:

  1. $ docker-compose up -d

check nsq web ui: http://127.0.0.1:4171

nsqio/go-nsq

Run producer & consumer :

  1. $ go run nsqio/main.go

output:

  1. 2021/02/06 06:31:29 INF 1 (127.0.0.1:4150) connecting to nsqd
  2. 2021/02/06 06:31:29 INF 2 [hello-topic/hello-channel] (127.0.0.1:4150) connecting to nsqd
  3. 2021/02/06 06:31:29 NSQ message received, msg: Hello World

more info: https://github.com/nsqio/go-nsq

segmentio/nsq-go

Run producer & consumer :

  1. $ go run segmentio/main.go

output:

  1. 2021/02/06 06:31:42 opening nsqd connection to localhost:4150
  2. Hello World!

more info: https://github.com/segmentio/nsq-go