This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
<topic name="demo.exception" request="Magento\TestModuleMysqlMq\Model\DataObject"/>
<topic name="demo.connection.exception" request="Magento\TestModuleMysqlMq\Model\DataObject"/>
<topic name="test.schema.defined.by.method" schema="Magento\TestModuleMysqlMq\Model\DataObjectRepository::delayedOperation" is_synchronous="false"/>
<topic name="demo.object.created" request="Magento\TestModuleMysqlMq\Model\DataObject"/>
<topic name="demo.object.updated" request="Magento\TestModuleMysqlMq\Model\DataObject"/>
<topic name="demo.object.custom.created" request="Magento\TestModuleMysqlMq\Model\DataObject"/>
</config>
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_TestModuleMysqlMq" active="true">
</module>
</config>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
<broker topic="demo.exception" type="db" exchange="magento">
<queue consumer="demoConsumerWithException" name="queue-exception" handler="Magento\TestModuleMysqlMq\Model\Processor::processMessageWithException"/>
</broker>
<broker topic="demo.connection.exception" type="db" exchange="magento">
<queue consumer="demoConsumerWithConnectionException" name="queue-connection-exception" handler="Magento\TestModuleMysqlMq\Model\Processor::processMessageWithConnectionException"/>
</broker>
<broker topic="test.schema.defined.by.method" type="db" exchange="magento">
<queue consumer="delayedOperationConsumer" name="demo-queue-6" handler="Magento\TestModuleMysqlMq\Model\DataObjectRepository::delayedOperation"/>
</broker>
<broker topic="demo.object.created" type="db" exchange="magento">
<queue consumer="demoConsumerQueueOne" name="queue-created" handler="\Magento\TestModuleMysqlMq\Model\Processor::processObjectCreated"/>
</broker>
<broker topic="demo.object.updated" exchange="magento" type="db">
<queue consumer="demoConsumerQueueTwo" name="queue-updated" handler="\Magento\TestModuleMysqlMq\Model\Processor::processObjectUpdated"/>
</broker>
<broker topic="demo.object.custom.created" exchange="magento" type="db">
<queue consumer="demoConsumerQueueThree" name="queue-custom-created" handler="\Magento\TestModuleMysqlMq\Model\Processor::processCustomObjectCreated"/>
</broker>
</config>
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
<consumer name="demoConsumerQueueOne" queue="queue-created" connection="db" handler="Magento\TestModuleMysqlMq\Model\Processor::processObjectCreated"/>
<consumer name="demoConsumerQueueTwo" queue="queue-updated" connection="db" handler="Magento\TestModuleMysqlMq\Model\Processor::processObjectUpdated"/>
<consumer name="demoConsumerQueueThree" queue="queue-custom-created" connection="db" handler="Magento\TestModuleMysqlMq\Model\Processor::processCustomObjectCreated"/>
<consumer name="demoConsumerWithException" queue="queue-exception" connection="db" handler="Magento\TestModuleMysqlMq\Model\Processor::processMessageWithException"/>
<consumer name="demoConsumerWithConnectionException" queue="queue-connection-exception" connection="db" handler="Magento\TestModuleMysqlMq\Model\Processor::processMessageWithConnectionException"/>
<consumer name="delayedOperationConsumer" queue="demo-queue-6" connection="db" handler="Magento\TestModuleMysqlMq\Model\DataObjectRepository::delayedOperation"/>
</config>
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
<publisher topic="demo.exception">
<connection name="db" exchange="magento"/>
</publisher>
<publisher topic="demo.connection.exception">
<connection name="db" exchange="magento"/>
</publisher>
<publisher topic="test.schema.defined.by.method">
<connection name="db" exchange="magento"/>
</publisher>
<publisher topic="demo.object.created">
<connection name="db" exchange="magento"/>
</publisher>
<publisher topic="demo.object.updated">
<connection name="db" exchange="magento"/>
</publisher>
<publisher topic="demo.object.custom.created">
<connection name="db" exchange="magento"/>
</publisher>
</config>
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
<exchange name="magento" type="topic" connection="db">
<binding id="demo.exception.consumer" topic="demo.exception" destination="queue-exception" destinationType="queue"/>
<binding id="demo.connection.exception.consumer" topic="demo.connection.exception" destination="queue-connection-exception" destinationType="queue"/>
<binding id="test.schema.defined.by.method" topic="test.schema.defined.by.method" destination="demo-queue-6" destinationType="queue"/>
<binding id="demo.object.created" topic="demo.object.created" destination="queue-created" destinationType="queue"/>
<binding id="demo.object.updated" topic="demo.object.updated" destination="queue-updated" destinationType="queue"/>
<binding id="demo.object.all" topic="demo.object.*" destination="queue-custom-created" destinationType="queue"/>
</exchange>
</config>