powertools-lambda-typescript icon indicating copy to clipboard operation
powertools-lambda-typescript copied to clipboard

feat(batch): Async Processing of Records for for SQS Fifo

Open arnabrahman opened this issue 4 months ago • 8 comments

Summary

SQS Fifo doesn't have an async processing feature. This PR adds the feature to process async records with SQS Fifo.

Changes

  • This is a WIP PR.
  • Introduced a mixin for all the common functionalities for SQS Fifo
  • Mixins have limitations when using private/protected properties. I updated the functions for this, the only major change is shortCircuitProcessing is now private instead of protected. The rest of the private functions remain the same.
  • Use the mixin for SqsFifoPartialProcessor, and refactor the class to cater to this
  • A new class SqsFifoPartialProcessorAsync is created to handle the async processing.
  • Change processPartialResponse & BatchProcessingOptions for SqsFifoPartialProcessorAsync
  • Duplicate the same tests of SqsFifoPartialProcessor to SqsFifoPartialProcessorAsync (This part can be optimized with describe.each I believe)

Issue number: closes #3140


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

arnabrahman avatar Oct 06 '24 10:10 arnabrahman