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

[Messenger] [WIP] Be able to start a worker for multiple queues with custom consumption priorities#47602

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

Open
d-ph wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromd-ph:feature/poc-messenger-custom-task-order-execution

Conversation

d-ph
Copy link

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#45882 -->
LicenseMIT
Doc PRtodo
  • fix the tests as they have not been updated yet
  • submit changes to the documentation
  • document the BC breaks
  • finish the code
  • gather feedback for my changes

This PR adds a way to run the messenger worker with different, potentially custom execution strategies. Beside extracting the current "execution strategy", it also adds a new one: "com.symfony.ranked", which satisfies the requirements described in the related ticket:#45882.

An example that demonstrates the entire feature:

bin/console messenger:consume queue_a queue_b queue_b_low queue_b_lowest queue_c \  --strategy="com.symfony.ranked" \  --strategy-config="{\"ranks\": [1, 1, 2, 3, 1]}"

At present, I would like to gather feedback for my changes before I go ahead and fix/write tests, etc. The code does work, however, as I integration-tested it in my test project.

Regarding BC, the feature might be breaking the compatibility because it adds a new required__construct() argument to the following classes:ConsumeMessagesCommand,Worker (this one is, however, annotated as final, so perhaps BC might not be a concern here). Please let me know if this indeed is a BC break. If yes, I'd appreciate a proposition on how to work around it (perhaps setter injection could be used instead, but it has its own downsides).

@carsonbotcarsonbot added this to the6.2 milestoneSep 16, 2022
@carsonbotcarsonbot changed the title[WIP] [Messenger] Be able to start a worker for multiple queues with custom consumption priorities[Messenger] [WIP] Be able to start a worker for multiple queues with custom consumption prioritiesSep 16, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
@xabbuhxabbuh modified the milestones:7.1,7.2May 15, 2024
@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

[Messenger] Be able to start a worker for multiple queues with custom consumption priorities
5 participants
@d-ph@fabpot@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp