Allow configuration for delete_message behavior of SQS Events
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
According to the documentation for `SQS Events` the SQS `delete_message` is called automatically if the lambda complete successfully:
https://aws.github.io/chalice/topics/events.html?highlight=delete_message
I have a use case where I need to schedule messages for times longer than the 15-minute message timer in SQS:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-timers.html
To do this I'm sending a message to the queue and including the time the message should be processed with the body. I then change the visibility timeout of the message so that the message is received again at the time I actually need it processed (since this can be up to 12 hours later). In order to prevent chalice from deleting this message automatically I'm raising an exception after changing the message visibility. This works, but from a monitoring standpoint it makes it difficult to keep track of my lambda when I have to force raise Exceptions. It would be nice to have an option with the `@app.on_sqs_message` decorator that allows me to configure whether the received message should be auto deleted or not. Thank you for considering this feature!
Contributor guide
Research direction
Start with the SQS Events documentation linked in the issue and trace the @app.on_sqs_message entry point that controls automatic deletion. Review existing SQS event tests if present, then define and verify both deletion modes and update the decorator documentation to describe the new option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100