Skip to content

Conversation

@kirktrue
Copy link
Contributor

@kirktrue kirktrue commented Oct 30, 2025

ApplicationEventHandler now waits for the ConsumerNetworkThread to
start up and complete execution of initializeResources(). If resource
initialization fails, the AsyncKafkaConsumer constructor will throw an
exception. This mimics the behavior of ClassicKafkaConsumer.

…an cause hangs on AsyncKafkaConsumer.close()

WIP
@github-actions github-actions bot added triage PRs from the community consumer clients small Small PRs labels Oct 30, 2025
@github-actions github-actions bot removed the small Small PRs label Oct 30, 2025
Use ConsumerUtils.maybeWrapAsKafkaException to possibly reduce an extra layer of exception handling.
@kirktrue kirktrue marked this pull request as ready for review October 31, 2025 22:26
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Copy link
Contributor

@LiamClarkeNZ LiamClarkeNZ left a comment

Choose a reason for hiding this comment

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

Nice fix!

I modified an AsyncKafkaConsumer unit test on trunk to use your invalid login module approach (and a non-mocked ApplicationEventHandler) to cause the network thread to fail and observed that the consumer hung.

I then used the same test on your branch to verify that the fix prevented this.

Only feedback is that it might be good to have a unit test at the AsyncKafkaConsumerTest level along the lines of one for KafkaConsumerTest? But this isn't blocking feedback.

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.

3 participants