Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[12.x] Add SQS FIFO and fair queue messageGroup() method support#57421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@patrickcarlohickman
Copy link
Contributor

This is a follow up to the previous PR#57187 that extended SQS FIFO and fair queue support to mailables, notifications, and event listeners. This PR adds support for defining amessageGroup method on the job classes instead of requiring the use of theonGroup() method at time of dispatch. See discussion on previous PRstarting here.

Summary

Normal jobs, mailables, and notifications are actively dispatched by the user and have the ability to callonGroup() at the time of dispatch. However, event listeners are not dispatched by the user. They are predefined ahead of time (with class methods), and then dispatching the event triggers the listener. There is nowhere for the user to callonGroup() for a class-based event listener.

Due to this, there was an inconsistency where event listeners supported amessageGroup() method on the class, but all the other job types required callingonGroup() at the time of dispatch.

To help add some consistency, this PR adds support for defining amessageGroup() method on the other job types, as well. This also allows the message group logic to remain encapsulated inside of the job and not need to be provided by the dispatching logic.

Notes

  • ThemessageGroup() method does not take any parameters.

  • The value of the$messageGroup property takes precedence over themessageGroup() method. This allows the dispatcher to still callonGroup() and have that value used instead of themessageGroup() method.

  • For notifications, the newmessageGroup() method support is in addition to the existing support for thewithMessageGroups($notifiable, $channel) method, which takes the notifiable and channel in as parameters to determine the message group.

Please let me know if you need me to make any changes or have any questions.

daronspence reacted with hooray emoji
@taylorotwelltaylorotwell merged commit446a1a5 intolaravel:12.xOct 17, 2025
68 checks passed
@taylorotwell
Copy link
Member

Thanks a ton!

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@patrickcarlohickman@taylorotwell

[8]ページ先頭

©2009-2025 Movatter.jp