Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Kafka bug with consumer groups and timeouts during repartitioning #80

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Fixed Kafka bug with consumer groups and timeouts during repartitioning #80

merged 1 commit into from
Nov 1, 2022

Conversation

jonchammer
Copy link

Background
In IBM/sarama#1192, a user reported seeing read tcp <ip>:63133-><ip>:9092: i/o timeout errors when consuming Kafka messages with a consumer group during rebalancing. As a response, Sarama updated their documentation and examples to indicate that the ConsumeClaim function should explicitly check for a completed Context (see: IBM/sarama#2240). It's possible that we may have run into the same problem when using nats-kafka, as we recently saw very similar errors in a production installation.

Description
With this PR, we're updating nats-kafka's Kafka Consumer to align with the updated usage advice from the Sarama developers (https://github.com/Shopify/sarama/blob/main/examples/consumergroup/main.go).

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Possible to introduce a test showing the fix?

@derekcollison derekcollison merged commit 681db34 into nats-io:main Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants