-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
\Magento\MysqlMq\Model\Driver\Exchange uses deprecated getQueuesByTopic, results in exception #21904
Comments
Hi @Berdir. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. @Berdir do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
My installation is pretty vanilla, I just have my single additional module that is trying to publish a message, I don't know if you can reproduce this without any custom code. |
\Magento\MysqlMq\Setup\Recurring::install is another class that uses the deprecated service and isn't working anymore. Here's my fix for that after updating the use statement:
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
✅ Confirmed by @engcom-backlog-nazar Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
I bit confused about all the automated updates, I'm new to this. Got a notifcation about a question how I see it is deprecated, but that seems to be have been deleted again, the whole interface is completely deprecated: \Magento\Framework\MessageQueue\ConfigInterface, it is the API for the 2.2-style events.xml configuration. I'm pretty confused about the deprecation process here. As I said, happy to provide a merge request, just need feedback on the topic matching, if there's an existing API that would support those wildcards and how that previous worked. Or if it's not supported by the mysql backend. |
HI @Berdir feel free to provide a PR, i'm just little bit confused and dont see that all class are deprecated. the issue is confirmed. |
Created a merge request, also updated the unit tests, still some open questions about the implementation. This shows the limits of unit tests perfectly, they still worked just fine. Would be useful to have an actual integration test, but I don't know yet how that works in Magento. Note that PhpStorm shows the old Interface also as deprecated: |
Thanks @Berdir — this must have taken a while to debug. I've created a patch from your commit and can confirm it works (2.3.1 and 2.3.2). |
Any progress on this one? It's a significant bug and renders queueing functionality useless when using MySQL as a driver. |
I'm not sure what is wrong but after applied patch from commit above |
(excerpt from my post https://erfanimani.com/using-magento-2-mysql-queue-for-order-post-processing) Hope that helps |
@magento I am working on it |
Hi @Zipmantos! 👋 |
This is just FYI: the check with PID files will change again in the near future (2.3.3 already seems to contain the change) where they now will use another way of locking (probably using the database), is being introduced by 1d9e07b (might be interesting for your blog post) |
Thanks for the tip @hostep ! I'll add it in. |
Hi @Tjitse-E. Thank you for working on this issue.
|
@Berdir I can't reproduce this on 2.3-dev. Can you check this again? I've created a sample module that processes queues without any problems (https://github.com/Vendic/magento2-mysql-queue-sample-module/tree/master). Let me know if i've missed something, but for now let's close this issue. |
This issue is definitely still there. I can check later, but it only
happens when using the new XML format as explained in the devdocs.
…On Mon, 21 Oct 2019, 17:55 Tjitse, ***@***.***> wrote:
@Berdir <https://github.com/Berdir> I can't reproduce this on 2.3-dev.
Can you check this again? I've created a sample module that processes
queues without any problems (
https://github.com/Vendic/magento2-mysql-queue-sample-module/tree/master).
Let me know if i've missed something, but for now let's close this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21904?email_source=notifications&email_token=AAHDFJXGFQ37LKQCHWN6FSTQPV4AZA5CNFSM4HARMGGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZYAMQ#issuecomment-544440370>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHDFJV3QJ44AOFT264AN5DQPV4AZANCNFSM4HARMGGA>
.
|
A couple things: queue.xml is deprecated. See here https://devdocs.magento.com/guides/v2.3/extension-dev-guide/message-queues/queue-migration.html
As mentioned, queue.xml is now split into the following three files:
Your repository @Tjitse-E makes use of both the deprecated queue.xml and the new files, which should be considered unusual. Then I looked at the updated DevDocs here https://devdocs.magento.com/guides/v2.3/extension-dev-guide/message-queues/config-mq.html And it mentions:
What the... What I think happened, somehow, someone mistakenly took this bug as if it was not a bug and wrote in the DevDocs that you need both the deprecated queue.xml file and the other files. So now you're specifying your XML in two different ways. One which is ignored because of the bug, and one that's deprecated but still works. 🤦♂ tldr: bad workaround for this bug has made it's way in the DevDocs, so you can't reproduce when following DevDocs. Correct workaround is to patch the bug with related PR and use the new queue xml format anyway. |
@erfanimani thanks for clarifying. When I remove queue.xml the issue appears. |
Hi @Tjitse-E. Thank you for working on this issue.
|
No worries, thanks for checking @Tjitse-E Seems Magento Core is also doing it that way.. https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/ImportExport/etc |
Hi @Berdir. Thank you for your report.
The fix will be available with the upcoming 2.3.5 release. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
I was able to get it working by replacing the call with this:
https://devdocs.magento.com/guides/v2.2/release-notes/backward-incompatible-changes/ was not that useful, because clearly you can't just loop over all queues, so I tried to go through the exchange, but didn't know how else to get the current exchange than hardcoding the db connection, as that information is not passed to the class.
The topic is also only an exact match, I'm not sure if there's an API or so that supports matching */# wildcards.
I can create a MR if this goes in the right direction.
The text was updated successfully, but these errors were encountered: