mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(lambda): redrive failed SQS ESM messages to the DLQ When an SQS event source mapping invocation failed, the poller left the message in-flight for the full execution-cover visibility window (fn.timeout + 30s) instead of returning it to the queue. The message was therefore never re-received, so ApproximateReceiveCount never crossed maxReceiveCount and the queue's RedrivePolicy never moved it to the DLQ. On a failed invocation (and for reported partial-batch failures) reset the affected messages' visibility to 0 so the next poll re-receives them, letting the existing redrive machinery move them to the DLQ. Closes #1416 * fix(lambda): return failed ESM messages using the queue visibility timeout Address PR review: resetting a failed message's visibility to 0 made it immediately eligible for redelivery, which spins a tight retry loop for a persistently failing function (far more aggressive than AWS). Reset to the queue's configured VisibilityTimeout instead (falling back to the AWS default of 30s when unset), matching AWS's redelivery cadence while still letting ApproximateReceiveCount climb so the RedrivePolicy moves the message to the DLQ. Also document pollAndInvoke's package-private visibility as test-only.