Skip to content

[Issue] Add queue consumers start chain command #40854

@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #40840: Add queue consumers start chain command


Adds bin/magento queue:consumers:start-chain command.

Description (*)

This allows you to run many specified queue consumers in one command, without manually running each.

I've split the cron running up into two parts: app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php and app/code/Magento/MessageQueue/Model/ConsumersRunnerExecutor.php. This allows to make the other command to chain queue consumers.

The problem it solves

One of our clients is hosted on PlatformSH. PlatformSH won't work with the queue consumers running in the cron: https://github.com/platformsh-templates/magento2ce/blob/master/deploy.php#L136

Issue is, the worker runs async.operations.all, which seems to require a queue connection which we don't have, but we require DB queues to still work. With this, We can safely run the same cron runner, that works for us without a queue connection through a worker that wont break platformsh.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Pretty minimal, but run test with crons and running the new command,

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions