lianetm opened a new pull request, #16047: URL: https://github.com/apache/kafka/pull/16047
Handle FencedInstanceIdException that a consumer may receive in the heartbeat response. This will be the case when the consumer that is part of a group with an instance id is removed by and admin client, another member joins with the same member id (allowed in). The first member will receive a FencedInstanceId on its next heartbeat. The expectation is that this should be handled as a fatal error. There are no changes in logic with this PR, given that without being handled, the FencedInstanceId would be treated as an "unexpected error", which are treated as fatal errors, so the outcome is the same. But we're introducing this small change just for accuracy in the logic and the logs: FencedInstanceId is expected during heartbeat, a log line is shown describing the situation and why it happened, and it's treated as a fatal error. This PR also improves the test to ensure that the error propagated to the app thread matches the one received in the HB. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org