feat: add MessageGroupId in queues to activate fair-queue feature#4752
feat: add MessageGroupId in queues to activate fair-queue feature#4752
Conversation
1062ed3 to
e3e1a40
Compare
e3e1a40 to
908e527
Compare
|
This seems to be ignoring the entire point of adding The point is that you don't have to go digging around everywhere to find the id you want to use for I did all of this in https://github.com/alphagov/notifications-api/pull/4693/changes#diff-cca5917c620894fe770faa88835e9e186285d5b91a55fca992eb94d5dc87e635 |
@risicle the point of entry for a task needs an explicit message_group_id (in this case service_id) right? if you're re-enqueing the task again using "self" is valid (like I did for retries) at some point in the journey, we need an explicit grouping, otherwise where does it get it from? we need to pass on service_id |
|
See my PR, it gets done in |
|
We need to feed the message group id in at the point where a process becomes |
f1af5aa to
91d6414
Compare
@risicle done |
bb72345 to
f36f318
Compare
fff72cc to
b21c3a1
Compare
|
I think we need to inject the FWIW this is why I'm unsure about whether we should be adding |
b21c3a1 to
ea70df8
Compare
d7819b2 to
620a8fe
Compare
9305f6f to
06f7dab
Compare
4098856 to
1baebe9
Compare
2287b85 to
fe69570
Compare
fe69570 to
7ecb3ee
Compare
Summary
ENABLE_SQS_MESSAGE_GROUP_IDSto control on and off switch to fair-queue (it's set to ON on this PR)process_job.apply_asyncthere we set service_id, and all subsequent async operations on tasks.py inherit that field by callinggetattr(self, "message_group_id", None)Testing
Tracker table
What to do?
Table
0cceb044djob-tasks,database-tasks,send-sms-tasks/send-email-tasks/create-letters-pdf-tasks0cceb044drun-scheduled-jobs)job-tasks8acf0884dsend-sms-tasksorsend-email-tasks8acf0884dcreate-letters-pdf-tasks,antivirus-tasksorletter-tasksf8101d08bservice-callbacksf8101d08bservice-callbacks02b3dff47report-requests-notifications-tasks02b3dff47create-nightly-notification-status)reporting-tasks7ecb3ee27create-letters-pdf-tasks(+ follow-on queues)7ecb3ee27archive-unsubscribe-requestsordelete-notifications-older-than-retention)reporting-tasks7ecb3ee27research-mode-tasksTicket
Fair queue notifications-api (tasks)