admin管理员组

文章数量:1122832

Did anyone here manage to set the message group id for SQS to be dynamic? We are receiving updates from our Shopify stores through the AWS Eventbridge integrations. Whenever there is a peak in sales on a store we can only process a few events at a time because all of them are pushed to SQS with the same message group id.

Did anyone solve this issue?

Amazon Event Bridge

Did anyone here manage to set the message group id for SQS to be dynamic? We are receiving updates from our Shopify stores through the AWS Eventbridge integrations. Whenever there is a peak in sales on a store we can only process a few events at a time because all of them are pushed to SQS with the same message group id.

Did anyone solve this issue?

Amazon Event Bridge

Share Improve this question edited Nov 22, 2024 at 18:15 user1844599 asked Nov 21, 2024 at 16:50 user1844599user1844599 11 bronze badge 1
  • 1 It sounds like you should be using a regular SQS queue instead of a FIFO queue. – Mark B Commented Nov 21, 2024 at 17:39
Add a comment  | 

1 Answer 1

Reset to default 0

The issue arises because SQS FIFO queues ensure strict message ordering by processing messages with the same MessageGroupId one at a time. If all events are assigned the same MessageGroupId, processing becomes bottlenecked.

To solve this problem while preserving order for specific use cases (e.g., per store), you can make the MessageGroupId dynamic.

For example one groupID per store or per type

{
    "MessageGroupId": "store1.shopify.com",
    "MessageBody": "{...event data...}"
}

you need to consider the throughput limits: FIFO queues support up to 300 messages per second per MessageGroupId. If even a single group hits this limit, consider splitting the group further. Also, adjusting the MessageGroupId scope changes the ordering guarantees. Make sure your application logic aligns with this change.

Or consider changing from SQS Fifo to normal SQS

本文标签: amazon web servicesDynamic message group id from EventbridgeStack Overflow