-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[12.x] Rename group
to messageGroup
property
#56919
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
Conversation
fix #56895 Signed-off-by: Mior Muhammad Zaki <[email protected]>
src/Illuminate/Queue/SqsQueue.php
Outdated
|
||
if (is_null($messageGroup) && isset($job->group) && is_string($job->group)) { | ||
$messageGroup = $job->group; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to prevent breaking changes on any existing queues. We can remove it for 13 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the job instance doesn't have the $messageGroup
property but instead has a $group
property that is not related to Amazon SQS? I believe the same issue we're trying to solve would still exist in that case.
Also, I don't think we need to worry about breaking changes here, since the original PR was only merged 5 days ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It has to be a FIFO queue on SQS
$group
has to a string and not unique to be grouped by SQS
the chance of that is minimal to non existent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we have jobs that have a $group
and also a string
or hash value. The name $group
is too general and will most likely also be used in the app context. Strings can also occur here. In my opinion, a name should simply be chosen that does not conflict with job attributes from the app context. I don't think it's a breaking change to consistently rename it now. The bigger breaking change is the variable $group
, which breaks existing applications. There shouldn't be that many people who use the new feature directly in production and would therefore be affected by a change from $group
to another name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would using a property name like $_messageGroup
solve the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Brenneisen are you using SQS FIFO queue at the moment with $group
property but doesn't intend to use Fair queue by setting onGroup()
?
By default, SQS uses standard queue and not affected by this.
fix #56895