awslabs/eventbridge-kafka-connector

`SinkRecord` send multiple times in case of a fixable error

Closed this issue · 0 comments

Describe the bug

In case of a fixable error on sending a batch of SinkRecords within a PutEventsRequest will send all records again.

try {
batches.stream()
.flatMap(batch -> eventBridgeWriter.putItems(batch).stream())
.filter(EventBridgeWriterRecord::hasError)
.forEach(this::handleFailedEntries);
// only report successful putEvents calls
statusReporter.setSentRecords(eventBridgeWriterRecords.size());
} catch (EventBridgeWriterException e) {

To Reproduce

Steps to reproduce the behavior: See PR #47.

Expected behavior

I expect to only resend failed SinkRecords.

Environment:

Additional context