Feature request: allow SqsFifoPartialProcessor
to continue processing other group IDs upon failure
#2561
Closed
1 of 2 tasks
Labels
batch
This item relates to the Batch Processing Utility
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
Use case
Currently the
SqsFifoPartialProcessor
part of the Batch Processing utility short-circuits by throwing an error as soon as an item in a batch fails to process. This is done to prevent out-of-order processing.By default, we will stop processing at the first failure and mark unprocessed messages as failed to preserve ordering. However, this behavior may not be optimal for customers who wish to proceed with processing messages from a different group ID.
We should look into adding this feature.
Solution/User Experience
Customers should be able to pass a
skipGroupOnError
optionThis could be done by either accepting an option object when instantiating the processor, like:
Or by accepting a new option in the already existing option object accepted by the
processPartialResponseSync
function, like:The second one is probably more organic and allows customers additional customizability as they can define the value for
skipGroupOnError
in the context of a specific invocation, however it will likely require some TypeScript generic type so that it's accepted only when theprocessor
parameter is of typeSqsFifoPartialProcessor
.Either way, the value for
skipGroupOnError
should be saved in theSqsFifoPartialProcessor
instance and then taken in account when calling theshortCircuitProcessing
method to decide whether to throw or not.Alternative solutions
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: