sarama
sarama copied to clipboard
consumergroup example 'ErrClosedConsumerGroup error' can cause the program to hang
Description
https://github.com/IBM/sarama/blob/main/examples/consumergroup/main.go#L111
Versions
Sarama | Kafka | Go |
---|---|---|
Configuration
Logs
logs: CLICK ME
Additional Context
@dakunge whilst that's true, I thought the only way of triggering ErrClosedConsumerGroup was if the user explicitly called client.Close(), which in the example doesn't happen until after the for keepRunning { ... }
loop has already exited https://github.com/IBM/sarama/blob/98ec384372ecbb9d86036c6f210f840c45dbfa70/examples/consumergroup/main.go#L146
I guess we could call cancel() before the return, just to be sure both are coordinated in shutdown
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.