jegesh / python-sqs-listener

A simple wrapper for boto3 for listening, and sending, to an AWS SQS queue
Other
154 stars 72 forks source link

Make deletion of queue message optional even in success cases #15

Closed johngriebel closed 6 years ago

johngriebel commented 6 years ago

Hi, I'm currently developing using python-sqs-listener, and I've found myself wishing that deleting a queue message after handle_message was optional even when handle_message runs without raising an exception. I envision using this feature almost exclusively during development, but maybe there are use cases that don't want the message deleted after processing even in production code. I would be more than willing to submit a pull request, but I wanted to check in and see how this idea might be received. Thoughts?

jegesh commented 6 years ago

I honestly can't imagine a reasonable use case. I think if you are leaving messages in the queue after processing, then you're not actually using SQS as a message queue, and you might want to reconsider using it. (the fact that this is the only behavior available for the last 18 months of a moderately used package, and you're the first person to need this, also speak for itself)

On Tue, Mar 6, 2018, 12:47 PM John Griebel notifications@github.com wrote:

Hi, I'm currently developing using python-sqs-listener, and I've found myself wishing that deleting a queue message after handle_message was optional even when handle_message runs without raising an exception. I envision using this feature almost exclusively during development, but maybe there are use cases that don't want the message deleted after processing even in production code. I would be more than willing to submit a pull request, but I wanted to check in and see how this idea might be received. Thoughts?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jegesh/python-sqs-listener/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AGO5FhD8qmRR8ZUNn-GPLaf1lmJjtd0sks5tbmkYgaJpZM4SefOv .

johngriebel commented 6 years ago

Like I said, I've only personally wished for this during development to test worker code that processes messages. That's fine though, I'm going to close the issue.