Questions tagged [go-nsq]

NSQ is a realtime message processing system designed to operate at bitly’s scale, handling billions of messages per day.

3 questions
2
votes
1 answer

nsq cannot consume message by connecting to nsqlookupd

I tried to use docker-compose to run nsq, the docker-compose.yml as below: version: '3' services: nsqlookupd: image: nsqio/nsq command: /nsqlookupd ports: - "4160:4160" - "4161:4161" nsqd: image: nsqio/nsq …
pangpang
  • 7,603
  • 8
  • 46
  • 90
1
vote
1 answer

nsqjs clients, not receiving messages immediately from go-nsq server side

trying to learn nsq, and following the examples from here golang example and here nsqjs. I am sending messages in server side doing w/ a for loop and go routines var wg sync.WaitGroup for i := 0; i < 100; i++ { wg.Add(1) go func(x int) { …
Hokutosei
  • 1,773
  • 4
  • 19
  • 40
0
votes
1 answer

defer log.SetOutput(os.Stdout) after log.SetOutput(ioutil.Discard)

In go-nsq library (https://github.com/bitly/go-nsq/blob/master/writer_test.go#L38), I found the following code: log.SetOutput(ioutil.Discard) defer log.SetOutput(os.Stdout) Why does the author defer logging to stdout after discard the log?
Mingyu
  • 26,145
  • 13
  • 50
  • 58