Skip to content

Commit

Permalink
KafkaStreamPublisher: Fix ArrayIndexOutOfBoundsException (#4517)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind authored Sep 19, 2023
1 parent 2441289 commit 9405627
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public synchronized long consumeRecords(@NotNull final List<? extends ConsumerRe
: null;

for (ConsumerRecord<?, ?> record : records) {
if (--remaining == 0) {
if (remaining == 0) {
if (keyChunk != null) {
flushKeyChunk(keyChunk, chunks);
}
Expand Down Expand Up @@ -273,6 +273,8 @@ public synchronized long consumeRecords(@NotNull final List<? extends ConsumerRe
bytesProcessed += valueBytes;
}
}

--remaining;
}
if (keyChunk != null) {
flushKeyChunk(keyChunk, chunks);
Expand Down

0 comments on commit 9405627

Please sign in to comment.