nil message received causing NPE
rrh opened this issue · 7 comments
The case messages <- message
here at https://github.com/wvanbergen/kafka/blob/master/consumergroup/consumer_group.go#L413
appears to succeed, but there are situations I see where message == nil. This cause a problem when message.Offset is accessed in the case arm. I have not tried to further characterize what makes message == nil.
I'm using go 1.5.1 on ubuntu 14. For my present set of tests, I'm also compiling and runing -race, although I have not run anything to rule in/rule out these situations
I suppose message
can be nil
when the messages channel gets closes by the consumer, after which the channel will return nil continuously.
Hi @wvanbergen -
Same issue as #95.
Are there any plans to address this in the near future? i.e. Is the library still being actively maintained?
It's unlikely that I will get to this any time soon, but I'll gladly review and apply patches.
@rrh Care to give this patch a try? https://github.com/warebot/kafka
I'm no longer in a good position to try your patch... the project I was working on that needed these improved semantics was cancelled back in January, and I'm not sure I can put the pieces back together to fairly exercise this infrequently occurring situation.
Understood. Thanks for the prompt reply.
Mina Naguib
On Jun 16, 2016, at 11:41 AM, RobertHenry6bev notifications@github.com wrote:
I'm no longer in a good position to try your patch... the project I was working on that needed these improved semantics was cancelled back in January, and I'm not sure I can put the pieces back together to fairly exercise this infrequently occurring situation.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Closing this ad a duplicate of #95