Replies: 4 comments 4 replies
-
Hello @duc00! Sorry for the late reply, very busy days here. I'm assigning @rubenfonseca to answer this question because he created this processor and did some research on processing FIFO queues with partial failure. |
Beta Was this translation helpful? Give feedback.
-
Hi @duc00 thank you so much for opening this discussion, and for the clear explanation! I've spent some time analysing the code and why we've implemented it that way, and it boils down to your original quote from the documentation:
As stated above, the official AWS documentation doesn't mention that you can continue to process a different message group ID. It explicitly says to fail the rest of the messages. This should not create any bug, since the rejected messages should be automatically retried by SQS. Having said that, I understand that there could be opportunities for optimization based on your comments. However, given the official documentation, and out of an abundance of caution, we believe the current implementation should be the safest. Hope this helps, and thank you again for your great question! |
Beta Was this translation helpful? Give feedback.
-
@duc00 I want to dive deeper into this, and I've been trying to collect information. I've also talked to other customers using SQS FIFO, and they referenced this part of the documentation:
So I wanted to ask you: can you confirm me if you ever saw more than one message group ID on the same Lambda invocation when connected to a SQS FIFO queue? |
Beta Was this translation helpful? Give feedback.
-
Converted this into an issue: #2981 |
Beta Was this translation helpful? Give feedback.
-
Hello,
According to Implementing partial batch responses AWS doc:
I see that Powertools implementation of the doc, with
SqsFifoPartialProcessor
, is strictly following this recommendation. This question is thus more specific to AWS implementation of partial batch responses with FIFO. Posting the question on this repo seems to be a good entry point nonetheless, since both AWS developers and community interact on those subjects.My problem is the following:
I am processing a SQS FIFO queue with
SqsFifoPartialProcessor
. My batch size is 10. Since the queue is not high-scale, the batch often contains messages with different message group IDs. When a failure occurs, the rest of the processing is stopped and all records left are returned as failures to the queue. So I often end-up with valid records in my dead-letter queue just because they were processed in a batch containing an unrelated invalid one.My question:
Would it be valid, after a failure, to return all remaining records in the batch but only the ones with the same group ID? According to the doc, current implementation is recommended to preserve the ordering of messages in your queue. I am not seeing why processing other records with a different group ID would go against that. Thus my question.
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions