Skip to content

[Issue] Fix for queue numeric argument conversion #29615

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #26967: Fix for queue numeric argument conversion


Description (*)

Magento 2.4-develop

If we want to declare queue (I bet this also occurs the same way for exchanges) with arguments and we use numeric type argument in queue_topology.xml it is casted to string and in corrected file it gets wrapped in incorrect type for rabbit. Example of configuration:

 <exchange name="test.dead_letter" type="topic" connection="amqp">
        <binding id="test" topic="#" destinationType="queue"
                 destination="test_dead_letter">
            <arguments>
                <argument name="x-dead-letter-exchange" xsi:type="string">test.retry</argument>
                <argument name="x-message-ttl" xsi:type="number">36000</argument>
            </arguments>
        </binding>
    </exchange>

Of course using string type doesn't help as we get also string. While creating such a queue we get error similar to:
PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue 'test_dead_letter' in vhost '\': received the value '36000' of type 'longstr' but current is none.

If PR will be accepted, please port to 2.3 as well.

Related Pull Requests

This one has to be fixed first, as for now we are not able to declare queue with ANY parameters
#26966

Manual testing scenarios (*)

  1. Declare queue with numeric argument, for example x-message-ttl
  2. ...

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)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Labels

Component: AmqpEvent: MageCONF CD 2020Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions