Open abyss7 opened 5 years ago
From what i can see in the code, before close()
is called, the consumer callbacks are nullified to prevent holding refrences to the consumer itself. When handle_rebalance()
is called, the callback invoker throws because the assign callback is null, but its caught inside and returns an error instead. So the proper solution would be to check the error from the callback invoker.
This being said, I think it's an rdkafka
bug, because when close is called, it should not call the assignment callback. The consumer is going away so this would just be a null assignment.
The most typical problem is to create consumer and then close it. It leads to this backtrace:
Where the next call to
assign()
returns:Which leads to the thrown exception and Kafka hangs somewhere inside itself. I was unable to debug the root cause.
The exception handler copy-pasted from destructor into
handle_rebalance()
solves the symptoms.