Commit 012215c
GH-813: Re-pause a paused consumer after rebalance
Fixes #813
Kafka resumes the consumer(s) after a rebalance, but since the
`ListenerConsumer.consumerPaused` is still true, the container starts
consuming again and can't be paused without first issuing a resume.
On a rebalance, reset the boolean; the consumer will re-pause before
the next poll, if the container's `isPaused()` is still true after
the rebalance listeners exit.
Tested with a stand-alone Boot app (see the referenced issue).
**cherry-pick to 2.1.x**1 parent c5294f1 commit 012215c
File tree
1 file changed
+6
-0
lines changed- spring-kafka/src/main/java/org/springframework/kafka/listener
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
| |||
0 commit comments