Skip to content

[Issue] Allow queue-specific configuration to exceed the default max-messages value #40121

@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #40110: Allow queue-specific configuration to exceed the default max-messages value


Description (*)

Allow queue-specific configuration to exceed the default max-messages value

Currently, when configuring a specific max-messages value in queue_consumer.xml (e.g., 400000), the consumer command still uses the lower global default (e.g., 10000), because the logic applies min($consumer->getMaxMessages(), $maxMessages).

This change updates the behavior so that, if a queue has a specific max-messages configuration, it takes precedence over the default value.

Example:
Configured in queue_consumer.xml: max-messages = 400000

Default value: 10000

Before: the command uses --max-messages=10000

After: the command correctly uses --max-messages=400000

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create queue with max message higter default value

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

No one assigned

    Labels

    Area: FrameworkComponent: MessageQueuePriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.xIndicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions