Skip to content

Conversation

@ShivsundarR
Copy link
Contributor

What

  • Currently if a consumer/share-consumer calls close() before it has joined a group, then the heartbeat on close will be sent with epoch = -1 and the broker would return "GroupIdNotFoundException".
  • This was causing couple of tests in ShareConsumerTest to be flaky if the heartbeat to join the group was sent with epoch = -1.
  • Since this can occur in real scenarios as well, it would be better to tolerate this exception while we are leaving the group so that the consumer can close cleanly.

@github-actions github-actions bot added triage PRs from the community consumer clients labels Jan 2, 2026
@AndrewJSchofield AndrewJSchofield added KIP-932 Queues for Kafka ci-approved and removed triage PRs from the community labels Jan 2, 2026
@AndrewJSchofield AndrewJSchofield self-requested a review January 2, 2026 14:46
@AndrewJSchofield
Copy link
Member

@ShivsundarR I still get a failure of testSubscribeOnInvalidTopicThrowsInvalidTopicException even with this patch.

@ShivsundarR
Copy link
Contributor Author

Thanks @AndrewJSchofield, I was using the incorrect state for the check, it should actually be MemberState.UNSUBSCRIBED, since we move from MemberState.LEAVING to MemberState.UNSUBSCRIBED after sending a leave request.
I have made this change now, and ran the test locally for 100 times and did not get a flake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants