Commit 2a34a4b
committed
Refactor fixTxOffsets to use ConsumerRecords#nextOffsets
Replaced the position()-based offset correction with nextOffsets() to
address known issues with transactional topics:
- Works correctly with both read_committed and read_uncommitted
- Handles empty poll() advancement and leader epoch propagation
- Fixes the case when max.poll.records equals transaction batch size
Signed-off-by: Su Ko <[email protected]>1 parent 1abc7c1 commit 2a34a4b
File tree
1 file changed
+6
-4
lines changed- spring-kafka/src/test/java/org/springframework/kafka/listener
1 file changed
+6
-4
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
1323 | 1322 | | |
1324 | 1323 | | |
1325 | 1324 | | |
1326 | | - | |
| 1325 | + | |
| 1326 | + | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
| |||
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
1374 | | - | |
| 1374 | + | |
| 1375 | + | |
1375 | 1376 | | |
1376 | 1377 | | |
1377 | 1378 | | |
| |||
1417 | 1418 | | |
1418 | 1419 | | |
1419 | 1420 | | |
1420 | | - | |
| 1421 | + | |
| 1422 | + | |
1421 | 1423 | | |
1422 | 1424 | | |
1423 | 1425 | | |
| |||
0 commit comments