-
-
Notifications
You must be signed in to change notification settings - Fork 972
Add support for fair queue in SQS #2342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
edc2745
cebbab3
73fd67e
88269fb
53dfef8
7cdc95f
906ddeb
0634419
22dc282
3baa6e1
3cfc027
b6f9e0f
ee92f4d
e81a4ff
de73e1a
4fce953
3af332b
d949190
294fd56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,4 +70,31 @@ Message Attributes | |
|
|
||
| SQS supports sending message attributes along with the message body. | ||
| To use this feature, you can pass a 'message_attributes' as keyword argument | ||
| to `basic_publish` method. | ||
| to `basic_publish` method. | ||
|
|
||
| Fair Queue Support (only available from version 5.7.0+) | ||
| ------------------------ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will need a versionadded 5.7 annotation here
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @auvipy both issues are taken care of, please check and let me know
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reminder on this @auvipy
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will start merging v5.7 from january 2026 |
||
|
|
||
| Kombu supports Amazon SQS Fair Queues, which provide improved message processing fairness by ensuring that messages from different message groups | ||
| are processed in a balanced manner. | ||
|
|
||
| Fair Queues are designed to prevent a single message group (or tenant) from monopolizing | ||
| consumer resources, which can happen with standard queues that handle multi-tenant | ||
| workloads with unbalanced message distribution. | ||
|
|
||
| When publishing messages to a Fair Queue, you should provide a `MessageGroupId`. This can be done by passing it as a | ||
| keyword argument to the `publish` method. While the Kombu implementation only sends `MessageGroupId` if it is present, AWS requires it for FIFO and Fair Queues. If omitted, AWS will reject the message or fairness will not be guaranteed. For standard queues, `MessageGroupId` is optional.:: | ||
|
|
||
| producer.publish( | ||
| message, | ||
| routing_key='my-fair-queue', | ||
| MessageGroupId='customer-123' # Required for FIFO queues; needed for Fair queue functionality on standard queues | ||
| ) | ||
|
|
||
| Benefits of using Fair Queues with Kombu: | ||
| - Improved message processing fairness across message groups | ||
| - Better workload distribution among consumers | ||
| - Eliminates noisy neighbor problem | ||
|
|
||
| For more information, refer to the AWS documentation on Fair Queues: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fair-queues.html | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.