Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue_topology.xml queue declaration #26969

Closed
bartoszkubicki opened this issue Feb 21, 2020 · 15 comments
Closed

Queue_topology.xml queue declaration #26969

bartoszkubicki opened this issue Feb 21, 2020 · 15 comments
Assignees
Labels
Component: MessageQueue Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: needs update Additional information is require, waiting for response Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@bartoszkubicki
Copy link

bartoszkubicki commented Feb 21, 2020

Summary (*)

There are a few issues about queue declaration in file queue_topology.xml.
First of all queues are side-effect of exchange and binding declaration. It is higly unintuituve. If we use lib laying underneath, we declare exchange, queue, and we bind them together, which is much more clear. It is worth noticing that queue, once declared can be bound to multiple exchanges, so it should be declared explicitly. It also limits queue configuration possibilities. You are not able to set arguments on queue level.

Secondly, taking first point into notice, if we have multiple bindings sharing same queue, which is declared with arguments, in the same file, we have to copy-paste around those arguments. If we won't do, it one definition of queue will be used, and arguments gets redeclared or even erased.
Merging definitions should be possible, but on module level.

Although, to start we following issues has to be fixed:
#26966
#26967

Examples (*)

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue_topology.xsd">
    <exchange name="test.job" type="topic" connection="amqp">
        <binding id="TestCreateJob" topic="job.create" destinationType="queue"
                 destination="test_create_job">
            <arguments>
                <argument name="x-dead-letter-exchange" xsi:type="string">test.job.dead_letter</argument>
            </arguments>
        </binding>
    </exchange>

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

    <exchange name="test.job.retry" type="topic" connection="amqp">
        <binding id="TestCreateJobRetry" topic="job.create" destinationType="queue"
                 destination="test_create_job">
            <arguments>
                <argument name="x-dead-letter-exchange" xsi:type="string">test.job.dead_letter</argument>
            </arguments>
        </binding>
    </exchange>
</config>

If we would remove arguments section for binding TestCreateJobRetry, queue test_create_job is created without any arguments and whole set up won't work at all.

This code works only if PRs attached to this issue will be fixed (I have patched it locally). For now arguments for queues are not used.

Proposed solution

Queues should be declared explicitly, so arguments are clear. I don't maybe, they even should have their separate xml. Maybe they also should be matched with unique id. Binding element will use queue id, so binding are created.

@bartoszkubicki bartoszkubicki added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Feb 21, 2020
@m2-assistant
Copy link

m2-assistant bot commented Feb 21, 2020

Hi @bartoszkubicki. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@bartoszkubicki do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 21, 2020
@bartoszkubicki bartoszkubicki added Component: MessageQueue and removed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Feb 21, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 21, 2020
@magento-engcom-team magento-engcom-team added this to Ready for QA in Community Backlog Mar 24, 2020
@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 24, 2020
@sidolov sidolov added this to Ready for Confirmation in Issue Confirmation and Triage Board Oct 21, 2020
@ghost ghost removed this from Ready for QA in Community Backlog Oct 21, 2020
@ghost ghost removed this from Ready for Grooming in Low Priority Backlog Oct 21, 2020
@ghost ghost added Issue: ready for confirmation and removed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Oct 21, 2020
@stale
Copy link

stale bot commented Jan 5, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale issue and removed stale issue labels Jan 5, 2021
@stale
Copy link

stale bot commented Mar 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added stale issue and removed stale issue labels Mar 22, 2021
@bartoszkubicki
Copy link
Author

Yes I can confirm that this issue is reproducible in vanilla magento instance. Some related issues may be fixed.

@stale
Copy link

stale bot commented Jun 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Jun 6, 2021
@bartoszkubicki
Copy link
Author

Still an issue

@m2-assistant
Copy link

m2-assistant bot commented Jun 8, 2021

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@m2-assistant
Copy link

m2-assistant bot commented Jun 11, 2021

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel engcom-Hotel added the Issue: needs update Additional information is require, waiting for response label Jun 14, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Jun 14, 2021
@engcom-Hotel engcom-Hotel added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Jun 14, 2021
@engcom-Hotel
Copy link
Contributor

Hi @bartoszkubicki ,

We have checked this issue on Magento version 2.4-develop but this is not reproducible. The issues mentioned in the ticket has been already merged with 2.4-develop.

Please check the issue with the version 2.4-develop and let us know if you found any issue.

@epolish
Copy link

epolish commented Jun 21, 2021

Hello @bartoszkubicki !
Just upgrade magento2 to 2.4 and recreate the queue topology via setup:upgrade (previous queues can be cleaned via rabbitmq management tool)

@engcom-Hotel
Copy link
Contributor

Hi @bartoszkubicki,

We are still waiting for your reply. Please confirm if you are still facing the issue in 2.4.x version.

@engcom-Hotel engcom-Hotel removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: needs update Additional information is require, waiting for response labels Jun 28, 2021
@m2-community-project m2-community-project bot moved this from Needs Update to Ready for Confirmation in Issue Confirmation and Triage Board Jun 28, 2021
@m2-community-project m2-community-project bot moved this from Needs Update to Ready for Confirmation in Issue Confirmation and Triage Board Jun 28, 2021
@engcom-Hotel engcom-Hotel added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Jun 28, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Jun 28, 2021
@engcom-Hotel engcom-Hotel added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Jun 28, 2021
@bartoszkubicki
Copy link
Author

@engcom-Hotel I didn't have time recently to check it again. I am going to examine that in two next week, so you can reopen this one.

@engcom-Hotel
Copy link
Contributor

Hi @bartoszkubicki,

Have you got chance to try to reproduce the issue in 2.4.x version?

Thanks

@bartoszkubicki
Copy link
Author

Not yet, on my todo list

@engcom-Hotel
Copy link
Contributor

Hello @bartoszkubicki,

We have waited for your response regarding reproducing the issue in the 2.4-develop branch for more than 14 days, but we are not able to get a response. Hence we are closing this issue for now.

If you still facing the issue, either you can reopen it or create a new ticket.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: MessageQueue Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: needs update Additional information is require, waiting for response Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

6 participants