工作原理:使用适用于 .Net 的 AWS-SQS 开发工具包,我能够接收消息批次并在消息可见性计时器窗口中删除单个消息。我也不能做任何事情并有效地将消息重新排队,如果它重新排队了配置的次数,那么它就会变成死信。
What doesn't work: I'm trying to do the same thing using a Lambda. I've created a trigger which works meaning SQS triggers the lambda sending it a batch of messages. These messages seem to get deleted from the queue automatically when this happens. I've no control over deleting an individual message or requeuing it.
Throwing an exception in the lambda seems to get all the messages in the batch to remain in the queue. Is there a more elegant way to do this and also is there a way to do it for individual messages instead of the entire batch?