Skip to content

Commit

Permalink
[eclipse-hono#8] Stop consuming the current batch if message handler …
Browse files Browse the repository at this point in the history
…throws an exception.

Signed-off-by: Abel Buechner-Mihaljevic <[email protected]>
  • Loading branch information
b-abel committed Feb 12, 2021
1 parent fc33730 commit e3139ee
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ private void handleBatch(final KafkaConsumerRecords<String, Buffer> records) {
} catch (final RuntimeException messageHandlingError) {
LOG.debug("Message handler failed", messageHandlingError);
// will commit the offset of the failed record and then resume polling (will include failed record)
break;
}
}
commit(true).compose(ok -> poll()).onSuccess(this::handleBatch);
Expand Down

0 comments on commit e3139ee

Please sign in to comment.