Questions tagged «message-queue»

1
Magento 2 EE 2.1中的消息队列配置更改
我一直在查看EE消息队列功能,但似乎还不完整。 在2.1之前的版本中,有一个合理的功能实现,允许您etc/queue.xml按照官方文档中的说明创建一个来定义发布者,主题,使用者和队列:http : //devdocs.magento.com/guides/v2.0/config-guide /mq/config-mq.html。 存在一些限制,例如除非它们与配置中定义的主题匹配,否则无法创建绑定,这限制了灵活性,因为您必须预先定义所有可能的主题。缺少重复的安装脚本也意味着您必须进行一些改动才能使安装程序脚本再次运行。 随着2.1的发布者,话题,消费者和绑定的元素etc/queue.xml已过时且配置之间的分裂etc/queue.xml和etc/communication.xml,因为在这里可以看到:https://github.com/magento/magento2-samples/blob/master/sample- module-sample-message-queue / etc /。仍然可以单独使用已弃用的发布者/主题/消费者/绑定架构,但不能与经修订的代理/队列架构结合使用。 但是,这些都没有出现在官方文档中,并且尚不清楚为什么配置被拆分并且在某些情况下需要重复。更重要的是,现在似乎没有定义绑定的工具,而是使用主题名称作为路由键。反过来,这也使得不可能使用特殊字符来绑定队列。因此,它似乎已经过重构,但功能已丢失。 令人欣慰的是,该magento/module-amqp模块现在使用循环安装程序脚本,因此在运行时会安装队列配置更改magento setup:upgrade。但是,此更改尚未应用于magento/module-mysql-mq模块。 因此,我想知道:a)我是否全部弄错了,实际上有创建绑定的方法,它比看起来更灵活?b)为什么要拆分配置? 附带说明一下,在进行此实验时,我一直在使用RabbitMQ教程中的拓扑示例之一,网址为https://www.rabbitmq.com/tutorials/tutorial-four-php.html: 此不推荐使用的配置在很大程度上实现了拓扑: queue.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd"> <topic name="quick.orange.rabbit" schema="Example\MessageQueue\Api\MessageInterface" publisher="default" /> <topic name="quick.orange.fox" schema="Example\MessageQueue\Api\MessageInterface" publisher="default" /> <topic name="lazy.pink.rabbit" schema="Example\MessageQueue\Api\MessageInterface" publisher="default" /> <topic name="lazy.orange.elephant" schema="Example\MessageQueue\Api\MessageInterface" publisher="default" /> <topic name="lazy.brown.fox" schema="Example\MessageQueue\Api\MessageInterface" publisher="default" /> <consumer name="consumerOne" …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.