Retry partial failures
See original GitHub issueHi,
Some AWS APIs can complete with partial success. For example, when calling a PutRecords
request with 500 entries, it is possible for some of the records to successfully get put and some fail.
PutRecordsRequest request = new PutRecordsRequest();
// add 500 entries to the request
PutRecordsResult response = producer.putRecords(request);
// response.getFailedRecordCount() could be between 0 and 500
// For example, the first 300 records might get inserts and the last 200 fail due to exceeding throughput
In such cases:
- the client should wait a bit,
- retrieve the index of failed records from
response
and fetch those failed records to build a newrequest
- re-call
producer.putRecords
with the new request
So every invocation needs access to the result of the previous execution (or null
for the first execution).
Is this possible to do with failsafe? From what I can see invocations do not have access to results of previous attempts.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11
Top Results From Across the Web
Handle SQS message failure in batch with partial ... - Medium
In this case, let's say the first 2 messages in the batch are processed successfully and deleted. The 3rd message failed and lambda...
Read more >Retry partial failures · Issue #105 - GitHub
Hi,. Some AWS APIs can complete with partial success. For example, when calling a PutRecords request with 500 entries, it is possible for...
Read more >AWS Lambda now supports partial batch response for SQS as ...
The Partial Batch Response feature an SQS queue will only retain those records which could not be successfully processed, improving processing ...
Read more >Complete Failures and Partial Failures of a Resource
A partial failure causes the fault monitor to increase by a fractional amount the count of complete failures in the retry interval.
Read more >Three Ways to Retry Failures In Your Serverless Application
When retrying a failure, it's standard practice to exponentially backoff with each retry using jitter. Jitter is a random delay used to prevent ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
First of all, great library - we use it for over a year now and are quite happy with it.
We have the exact same use-case (
PutRecords
for AWS Kinesis) and have worked around Failsafe’s limitations like this:Would be great if Failsafe could support this so we can remove the
AtomicReference
workaround.With the addition of
ExecutionContext.getLastResult
andgetLastFailure
I’m going to consider this closed. Feel free to comment and/or reopen if you feel those are inadequate for your use case.