Skip to content

Commit

Permalink
FIX: KafkaMessageListenerContainer#processTimestampSeeks offsetsForTi…
Browse files Browse the repository at this point in the history
…mes method can return map with null values
  • Loading branch information
hosuaby authored and garyrussell committed Jul 24, 2020
1 parent 7a0180e commit 343df6d
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -2008,7 +2008,13 @@ private void processTimestampSeeks() {
if (timestampSeeks != null) {
Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes = this.consumer
.offsetsForTimes(timestampSeeks);
offsetsForTimes.forEach((tp, ot) -> this.consumer.seek(tp, ot.offset()));

for (TopicPartition tp : offsetsForTimes.keySet()) {
OffsetAndTimestamp ot = offsetsForTimes.get(tp);
if (ot != null) {
this.consumer.seek(tp, ot.offset());
}
}
}
}

Expand Down

0 comments on commit 343df6d

Please sign in to comment.