Skip to content

Conversation

garyrussell
Copy link
Contributor

Resolves #3637

If there are no records to receive, the poll blocked for 20*pollTimeout.

Wake the consumer during partition assignment; however, this changes the behavior
when there are records present - the first poll always returns no records.

Detect that the wakeup was due to assignment and perform another poll.

Also add some debug logging, and don't create a new consumer if the source was
stopped.

cherry-pick to 5.4.x

Resolves spring-projects#3637

If there are no records to receive, the poll blocked for `20*pollTimeout`.

Wake the consumer during partition assignment; however, this changes the behavior
when there are records present - the first poll always returns no records.

Detect that the wakeup was due to assignment and perform another poll.

Also add some debug logging, and don't create a new consumer if the source was
stopped.

**cherry-pick to 5.4.x**
@artembilan artembilan merged commit b8e414d into spring-projects:main Sep 30, 2021
@artembilan
Copy link
Member

... and cherry-picked to 5.4.x

@garyrussell garyrussell deleted the GH-3637 branch October 5, 2021 14:27
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.

KafkaMessageSource Blocks on Initial Poll When No Records

2 participants