Closed bjornpost closed 8 years ago
Hi,
Thanks for the suggestion!
That looks like the correct way to implement it, create a PR and I will have a look.
From a brief scan of the docs I can't see a way of marking a particular message as un-processable to automatically get put on a dead letter queue from within SQS. The standard way SQS deals with it is by marking the number of times a message has been attempted.
The alternative is to manage it within this client, which is something we will think about.
Merged into master.
According to the docs this is possible by providing a
DelaySeconds
argument for eachEntry
. If I'm understanding things correctly, graze/queue currently only allows for settings theDelaySeconds
parameter for the entire queue, not message.To change that (for SqsAdapter, I guess this is n/a to the ArrayAdapter):
https://github.com/graze/queue/blob/master/src/Adapter/SqsAdapter.php#L236-L239
Usage:
I can prepare a PR if this is the way to go to implement such a feature.
Cheers, Bjorn
P.s. maybe I'm missing something, but should graze/queue be able to work with SQS death letter queues? How would I mark a message as 'unprocessable' (so SQS can move it to the dead letter queue?)