Skip to content

Add support for MessageGroupId in standard queues#2442

Open
areinel wants to merge 5 commits intocelery:mainfrom
areinel:SQS-fair-queue
Open

Add support for MessageGroupId in standard queues#2442
areinel wants to merge 5 commits intocelery:mainfrom
areinel:SQS-fair-queue

Conversation

@areinel
Copy link

@areinel areinel commented Jan 14, 2026

AWS now supports MessageGroupId on standard queues to enable fair queues, which mitigate the “noisy neighbor” impact in multi-tenant queues and help maintain consistent message dwell times across tenants
(https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fair-queues.html).

This change ensures:

FIFO queues always get MessageGroupId (defaulting to default) and MessageDeduplicationId.
Standard queues can pass MessageGroupId without triggering FIFO-only logic.

Note: reopened PR from branch instead of main**

@auvipy auvipy requested review from auvipy and Copilot and removed request for auvipy January 22, 2026 14:59
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this pr related #2342?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for MessageGroupId in standard SQS queues to enable AWS's fair queues feature, which helps mitigate "noisy neighbor" issues in multi-tenant environments.

Changes:

  • Simplified FIFO queue MessageGroupId handling to use .get() with a default value
  • Added support for passing MessageGroupId to standard (non-FIFO) queues
  • Code formatting improvements for better readability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +476 to +477
if 'MessageGroupId' in message['properties']:
kwargs['MessageGroupId'] = message['properties']['MessageGroupId']
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new functionality to support MessageGroupId in standard queues lacks test coverage. The existing test_predefined_queues_put_to_queue only verifies DelaySeconds behavior. Consider adding a test case that verifies MessageGroupId is correctly passed to send_message for standard queues when provided in message properties.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.24%. Comparing base (3a6f84f) to head (96983d7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2442      +/-   ##
==========================================
+ Coverage   81.19%   81.24%   +0.04%     
==========================================
  Files          77       77              
  Lines        9738     9741       +3     
  Branches     1098     1099       +1     
==========================================
+ Hits         7907     7914       +7     
+ Misses       1625     1623       -2     
+ Partials      206      204       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@auvipy auvipy added this to the 5.7.0 milestone Feb 4, 2026
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we got this older PR merged #2342. can you check if this pr is needed any more? or part of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments