nsq-go icon indicating copy to clipboard operation
nsq-go copied to clipboard

identify: add MsgTimeout

Open yields opened this issue 8 years ago • 1 comments

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 the same.

yields avatar Mar 24 '17 19:03 yields

Looks like you have these tests failing:

=== RUN   TestConsumer

=== RUN   TestConsumer/test-consumer-1

=== RUN   TestConsumer/test-consumer-10

=== RUN   TestConsumer/test-consumer-100

=== RUN   TestConsumer/test-consumer-1000

--- FAIL: TestConsumer (0.00s)

    --- FAIL: TestConsumer/test-consumer-1 (10.11s)

    	consumer_test.go:69: timeout

    --- FAIL: TestConsumer/test-consumer-1000 (10.64s)

    	consumer_test.go:69: timeout

    --- FAIL: TestConsumer/test-consumer-100 (10.15s)

    	consumer_test.go:69: timeout

    --- FAIL: TestConsumer/test-consumer-10 (10.12s)

    	consumer_test.go:69: timeout

=== RUN   TestRequeue

2017/03/25 00:50:29 GET http://localhost:4163?topic=test-requeue: 404 Not Found {"message":"TOPIC_NOT_FOUND"}; GET http://localhost:4165?topic=test-requeue: 404 Not Found {"message":"TOPIC_NOT_FOUND"}

--- FAIL: TestRequeue (10.01s)

	consumer_test.go:117: timeout

I triggered a rebuilt and it happened again.

achille-roussel avatar Mar 25 '17 00:03 achille-roussel