We have an extension that can make use of either MySQL driver db
or RabbitMQ amqp
.
The drive is mentioned on these files:
etc/queue_consumer.xml
etc/queue_publisher.xml
etc/queue_topology.xml
https://github.com/Nosto/nosto-magento2/blob/develop/etc/queue_consumer.xml
https://github.com/Nosto/nosto-magento2/blob/develop/etc/queue_publisher.xml
https://github.com/Nosto/nosto-magento2/blob/develop/etc/queue_topology.xml
By default, the XML definition causes it use the db
(MySQL). In order to switch over to RabbitMQ, all of the three XML files cited above need to be manually edited to set connection to amqp
. Having done that, you need to run setup:upgrade
.
We cannot ship with the default being amqp
as RabbitMQ isn't enabled by default in all Magento installations.
What is the recommended way - using overrides or the CLI - to force a queue to use the amqp
? While it is possible to do this manually by editing extension sources, it seems to be an anti-pattern of editing sources directly.
Does anybody have another idea? I appreciate the help!