Commit 7bfc6b7
GH-1646 Clear lastCommits after fixTxOffset
Resolves #1646
```
Failed to correct transactional offset(s)
java.lang.IllegalStateException: You can only check the position for partitions assigned to this consumer.
```
It is not clear how this happened since we remove revoked partitions from `lastCommits`.
However, `lastCommits` should be cleared, even if successful, to avoid unnecessary
processing if no records are received by the next poll.
- add the `lastCommits` to the error log
- clear `lastCommits` in a finally block
**cherry-pick to 2.5.x**
(cherry picked from commit ef6c115)1 parent fa8cbeb commit 7bfc6b7
File tree
2 files changed
+6
-1
lines changed- spring-kafka/src
- main/java/org/springframework/kafka/listener
- test/java/org/springframework/kafka/listener
2 files changed
+6
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
1215 | | - | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1216 | 1220 | | |
1217 | 1221 | | |
1218 | 1222 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
| |||
0 commit comments