I'm a Go novice coming from the Node world and I'm building a consumer using the official Bitly Go client. I am using AddConcurrentHandlers to spawn 50 goroutines to handle the fire hose of messages. The issue is that my consumer falls behind leaving an exponential of unprocessed/received messages on nsq. Has anyone else encountered this?
I built the same thing in Node to see if there was a server or NSQ configuration issue and its able to process all messages as quickly as they come in.
GO CODE:
q, _ := nsq.NewConsumer("chat", "golangbetches", config)
q.AddConcurrentHandlers(nsq.HandlerFunc(func(message *nsq.Message) error {
l.Debug("Got a message: %v", message)
message.Finish()
return nil
}), 50)
err := q.ConnectToNSQLookupd("<address here>")