Skip to content

Commit a047e11

Browse files
committed
Kafka Throttled commit: Handle case where consumer committed throws error (ex. WakeupException)
1 parent 827bbed commit a047e11

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

smallrye-reactive-messaging-kafka/src/main/java/io/smallrye/reactive/messaging/kafka/commit/KafkaThrottledLatestProcessedCommit.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public <K, V> Uni<IncomingKafkaRecord<K, V>> received(IncomingKafkaRecord<K, V>
231231
} else {
232232
uni = consumer.committed(recordsTopicPartition)
233233
.emitOn(this::runOnContext) // Switch back to event loop
234+
.onFailure().recoverWithItem(Collections::emptyMap)
234235
.onItem().transform(offsets -> {
235236
OffsetAndMetadata lastCommitted = offsets.get(recordsTopicPartition);
236237
OffsetStore store = new OffsetStore(recordsTopicPartition, unprocessedRecordMaxAge,

0 commit comments

Comments
 (0)