nsq-go
nsq-go copied to clipboard
Go package providing tools for building NSQ clients, servers and middleware.
This PR adds deferred publishing functionality. Both the HTTP API and the NSQ TCP API are supported. Tests for NSQ TCP API are included. This causes (at least) 10 s...
I fixed the typo (`MutliPublish` -> `MultiPublish`) but also created an alias for backwards compatibility. This way the API is left intact but new users can use the method without...
In file `lookup.go, line 55`, there seems to be an inconsistency of the struct used to marshal the json returned by `nsqdlookup`. Currently it is: ```go v := struct {...
I noticed in `handler.go`: ``` v1 := req.Header.Get("Accept") == "application/vnd.nsq; version=1.0" if !v1 { value = struct { StatusCode int `json:"status_code"` StatusText string `json:"status_txt"` Data interface{} `json:"data"` }{ StatusCode: status,...
Could we simply return an `error` type instead of panicing? This seems like a recoverable error to me. cc @achille-roussel ``` panic: (*Message).Finish or (*Message).Requeue has already been called goroutine...
This PR will let clients configure their own msg_timeout: ``` c, err := nsq.StartConsumer(nsq.ConsumerConfig{ Identify: nsq.Identify{MsgTimeout: time.Second * 5}, }) ``` If `MsgTimeout` is not passed, the behavior should be...
I was running into some flakiness running the tests on Mac, which tries to dial ipv6 if you specify "localhost" so try to ensure we are dialing on ipv4. The...
https://nsq.io/components/nsqd.html#post-pub where = defer - the time in ms to delay message delivery (optional) Struct doesn't represent defer field https://github.com/segmentio/nsq-go/blob/master/pub.go#L12
This lets us print structured errors and also introduce leveled logs.