Skip to content

Commit 4cc763c

Browse files
authored
Merge pull request #7364 from magento-performance/MCP-826
[Performance] Use RabbitMQ for all consumers if AMQP is set in deployment config
2 parents 43238ce + 09ff393 commit 4cc763c

File tree

76 files changed

+404
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+404
-247
lines changed

app/code/Magento/Catalog/etc/queue.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="product_action_attribute.update" exchange="magento-db" type="db">
10-
<queue name="product_action_attribute.update" consumer="product_action_attribute.update" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\Catalog\Model\Attribute\Backend\Consumer::process"/>
9+
<broker topic="product_action_attribute.update" exchange="magento">
10+
<queue name="product_action_attribute.update" consumer="product_action_attribute.update" handler="Magento\Catalog\Model\Attribute\Backend\Consumer::process"/>
1111
</broker>
12-
<broker topic="product_action_attribute.website.update" exchange="magento-db" type="db">
13-
<queue name="product_action_attribute.website.update" consumer="product_action_attribute.website.update" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\Catalog\Model\Attribute\Backend\ConsumerWebsiteAssign::process"/>
12+
<broker topic="product_action_attribute.website.update" exchange="magento">
13+
<queue name="product_action_attribute.website.update" consumer="product_action_attribute.website.update" handler="Magento\Catalog\Model\Attribute\Backend\ConsumerWebsiteAssign::process"/>
1414
</broker>
15-
</config>
15+
</config>

app/code/Magento/Catalog/etc/queue_consumer.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
9-
<consumer name="product_action_attribute.update" queue="product_action_attribute.update" connection="db" maxMessages="5000" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\Catalog\Model\Attribute\Backend\Consumer::process" />
10-
<consumer name="product_action_attribute.website.update" queue="product_action_attribute.website.update" connection="db" maxMessages="5000" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\Catalog\Model\Attribute\Backend\ConsumerWebsiteAssign::process" />
11-
</config>
9+
<consumer name="product_action_attribute.update" queue="product_action_attribute.update" handler="Magento\Catalog\Model\Attribute\Backend\Consumer::process" />
10+
<consumer name="product_action_attribute.website.update" queue="product_action_attribute.website.update" handler="Magento\Catalog\Model\Attribute\Backend\ConsumerWebsiteAssign::process" />
11+
</config>

app/code/Magento/Catalog/etc/queue_publisher.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="product_action_attribute.update">
10-
<connection name="db" exchange="magento-db" />
11-
</publisher>
12-
<publisher topic="product_action_attribute.website.update">
13-
<connection name="db" exchange="magento-db" />
14-
</publisher>
15-
</config>
9+
<publisher topic="product_action_attribute.update"/>
10+
<publisher topic="product_action_attribute.website.update"/>
11+
</config>

app/code/Magento/Catalog/etc/queue_topology.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
9-
<exchange name="magento-db" type="topic" connection="db">
10-
<binding id="updateBinding" topic="product_action_attribute.update" destinationType="queue" destination="product_action_attribute.update"/>
11-
<binding id="updateBindingWebsite" topic="product_action_attribute.website.update" destinationType="queue" destination="product_action_attribute.website.update"/>
9+
<exchange name="magento">
10+
<binding id="updateBinding" topic="product_action_attribute.update" destination="product_action_attribute.update"/>
11+
<binding id="updateBindingWebsite" topic="product_action_attribute.website.update" destination="product_action_attribute.website.update"/>
1212
</exchange>
13-
</config>
13+
</config>

app/code/Magento/ImportExport/etc/queue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="import_export.export" exchange="magento-db" type="db">
10-
<queue name="export" consumer="exportProcessor" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\ImportExport\Model\Export\Consumer::process"/>
9+
<broker topic="import_export.export" exchange="magento">
10+
<queue name="export" consumer="exportProcessor" handler="Magento\ImportExport\Model\Export\Consumer::process"/>
1111
</broker>
1212
</config>

app/code/Magento/ImportExport/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
9-
<consumer name="exportProcessor" queue="export" connection="db" maxMessages="100" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\ImportExport\Model\Export\Consumer::process" />
9+
<consumer name="exportProcessor" queue="export" handler="Magento\ImportExport\Model\Export\Consumer::process" />
1010
</config>

app/code/Magento/ImportExport/etc/queue_publisher.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="import_export.export">
10-
<connection name="db" exchange="magento-db" />
11-
</publisher>
9+
<publisher topic="import_export.export"/>
1210
</config>

app/code/Magento/ImportExport/etc/queue_topology.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
9-
<exchange name="magento-db" type="topic" connection="db">
10-
<binding id="exportBinding" topic="import_export.export" destinationType="queue" destination="export"/>
9+
<exchange name="magento">
10+
<binding id="exportBinding" topic="import_export.export" destination="export"/>
1111
</exchange>
1212
</config>

app/code/Magento/MediaContentSynchronization/etc/queue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="media.content.synchronization" exchange="magento-db" type="db">
10-
<queue name="media.content.synchronization" consumer="media.content.synchronization" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\MediaContentSynchronization\Model\Consume::execute" />
9+
<broker topic="media.content.synchronization" exchange="magento">
10+
<queue name="media.content.synchronization" consumer="media.content.synchronization" handler="Magento\MediaContentSynchronization\Model\Consume::execute" />
1111
</broker>
1212
</config>

app/code/Magento/MediaContentSynchronization/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
99
<consumer name="media.content.synchronization" queue="media.content.synchronization"
10-
connection="db" handler="Magento\MediaContentSynchronization\Model\Consume::execute"/>
10+
handler="Magento\MediaContentSynchronization\Model\Consume::execute"/>
1111
</config>

app/code/Magento/MediaContentSynchronization/etc/queue_publisher.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
-->
77
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="media.content.synchronization">
10-
<connection name="db" exchange="magento-db" disabled="false" />
11-
</publisher>
9+
<publisher topic="media.content.synchronization"/>
1210
</config>

app/code/Magento/MediaContentSynchronization/etc/queue_topology.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
10-
<exchange name="magento-db" type="topic" connection="db">
11-
<binding id="MediaContentSynchronization" topic="media.content.synchronization"
12-
destinationType="queue" destination="media.content.synchronization"/>
10+
<exchange name="magento">
11+
<binding id="MediaContentSynchronization" topic="media.content.synchronization" destination="media.content.synchronization"/>
1312
</exchange>
1413
</config>

app/code/Magento/MediaGalleryRenditions/etc/queue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="media.gallery.renditions.update" exchange="magento-db" type="db">
10-
<queue name="media.gallery.renditions.update" consumer="media.gallery.renditions.update" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\MediaGalleryRenditions\Model\Queue\UpdateRenditions::execute" />
9+
<broker topic="media.gallery.renditions.update" exchange="magento">
10+
<queue name="media.gallery.renditions.update" consumer="media.gallery.renditions.update" handler="Magento\MediaGalleryRenditions\Model\Queue\UpdateRenditions::execute" />
1111
</broker>
1212
</config>

app/code/Magento/MediaGalleryRenditions/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
99
<consumer name="media.gallery.renditions.update" queue="media.gallery.renditions.update"
10-
connection="db" handler="Magento\MediaGalleryRenditions\Model\Queue\UpdateRenditions::execute"/>
10+
handler="Magento\MediaGalleryRenditions\Model\Queue\UpdateRenditions::execute"/>
1111
</config>

app/code/Magento/MediaGalleryRenditions/etc/queue_publisher.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
-->
77
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="media.gallery.renditions.update">
10-
<connection name="db" exchange="magento-db" disabled="false" />
11-
</publisher>
9+
<publisher topic="media.gallery.renditions.update"/>
1210
</config>

app/code/Magento/MediaGalleryRenditions/etc/queue_topology.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
10-
<exchange name="magento-db" type="topic" connection="db">
11-
<binding id="MediaGalleryRenditions" topic="media.gallery.renditions.update"
12-
destinationType="queue" destination="media.gallery.renditions.update"/>
10+
<exchange name="magento">
11+
<binding id="MediaGalleryRenditions" topic="media.gallery.renditions.update" destination="media.gallery.renditions.update"/>
1312
</exchange>
1413
</config>

app/code/Magento/MediaGallerySynchronization/etc/queue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="media.gallery.synchronization" exchange="magento-db" type="db">
10-
<queue name="media.gallery.synchronization" consumer="media.gallery.synchronization" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\MediaGallerySynchronization\Model\Consume::execute" />
9+
<broker topic="media.gallery.synchronization" exchange="magento">
10+
<queue name="media.gallery.synchronization" consumer="media.gallery.synchronization" handler="Magento\MediaGallerySynchronization\Model\Consume::execute" />
1111
</broker>
1212
</config>

app/code/Magento/MediaGallerySynchronization/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
99
<consumer name="media.gallery.synchronization" queue="media.gallery.synchronization"
10-
connection="db" handler="Magento\MediaGallerySynchronization\Model\Consume::execute"/>
10+
handler="Magento\MediaGallerySynchronization\Model\Consume::execute"/>
1111
</config>

app/code/Magento/MediaGallerySynchronization/etc/queue_publisher.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
-->
77
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="media.gallery.synchronization">
10-
<connection name="db" exchange="magento-db" disabled="false" />
11-
</publisher>
9+
<publisher topic="media.gallery.synchronization"/>
1210
</config>

app/code/Magento/MediaGallerySynchronization/etc/queue_topology.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
10-
<exchange name="magento-db" type="topic" connection="db">
11-
<binding id="MediaGallerySynchronization" topic="media.gallery.synchronization"
12-
destinationType="queue" destination="media.gallery.synchronization"/>
10+
<exchange name="magento">
11+
<binding id="MediaGallerySynchronization" topic="media.gallery.synchronization" destination="media.gallery.synchronization"/>
1312
</exchange>
1413
</config>

app/code/Magento/MediaStorage/etc/queue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="media.storage.catalog.image.resize" exchange="magento-db" type="db">
10-
<queue name="media.storage.catalog.image.resize" consumer="media.storage.catalog.image.resize" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\MediaStorage\Model\ConsumerImageResize::process" />
9+
<broker topic="media.storage.catalog.image.resize" exchange="magento">
10+
<queue name="media.storage.catalog.image.resize" consumer="media.storage.catalog.image.resize" handler="Magento\MediaStorage\Model\ConsumerImageResize::process" />
1111
</broker>
1212
</config>

app/code/Magento/MediaStorage/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
9-
<consumer name="media.storage.catalog.image.resize" queue="media.storage.catalog.image.resize" connection="db" maxMessages="100" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\MediaStorage\Model\ConsumerImageResize::process" />
9+
<consumer name="media.storage.catalog.image.resize" queue="media.storage.catalog.image.resize" handler="Magento\MediaStorage\Model\ConsumerImageResize::process" />
1010
</config>

app/code/Magento/MediaStorage/etc/queue_publisher.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
9-
<publisher topic="media.storage.catalog.image.resize">
10-
<connection name="db" exchange="magento-db" />
11-
</publisher>
9+
<publisher topic="media.storage.catalog.image.resize"/>
1210
</config>

app/code/Magento/MediaStorage/etc/queue_topology.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
9-
<exchange name="magento-db" type="topic" connection="db">
10-
<binding id="imageResizeBinding" topic="media.storage.catalog.image.resize" destinationType="queue" destination="media.storage.catalog.image.resize"/>
9+
<exchange name="magento">
10+
<binding id="imageResizeBinding" topic="media.storage.catalog.image.resize" destination="media.storage.catalog.image.resize"/>
1111
</exchange>
1212
</config>

app/code/Magento/MessageQueue/Setup/ConfigOptionsList.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\App\DeploymentConfig;
1313
use Magento\Framework\Config\Data\ConfigData;
1414
use Magento\Framework\Config\File\ConfigFilePool;
15+
use Magento\Framework\Setup\Option\TextConfigOption;
1516

1617
/**
1718
* Deployment configuration consumers options needed for Setup application
@@ -21,17 +22,20 @@ class ConfigOptionsList implements ConfigOptionsListInterface
2122
/**
2223
* Input key for the option
2324
*/
24-
const INPUT_KEY_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES ='consumers-wait-for-messages';
25+
public const INPUT_KEY_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES ='consumers-wait-for-messages';
26+
public const INPUT_KEY_QUEUE_DEFAULT_CONNECTION ='queue-default-connection';
2527

2628
/**
27-
* Path to the value in the deployment config
29+
* Path to the values in the deployment config
2830
*/
29-
const CONFIG_PATH_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES = 'queue/consumers_wait_for_messages';
31+
public const CONFIG_PATH_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES = 'queue/consumers_wait_for_messages';
32+
public const CONFIG_PATH_QUEUE_DEFAULT_CONNECTION = 'queue/default_connection';
3033

3134
/**
3235
* Default value
3336
*/
34-
const DEFAULT_CONSUMERS_WAIT_FOR_MESSAGES = 1;
37+
public const DEFAULT_CONSUMERS_WAIT_FOR_MESSAGES = 1;
38+
public const DEFAULT_QUEUE_CONNECTION = 'db';
3539

3640
/**
3741
* The available configuration values
@@ -54,6 +58,13 @@ public function getOptions()
5458
'Should consumers wait for a message from the queue? 1 - Yes, 0 - No',
5559
self::DEFAULT_CONSUMERS_WAIT_FOR_MESSAGES
5660
),
61+
new TextConfigOption(
62+
self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION,
63+
TextConfigOption::FRONTEND_WIZARD_TEXT,
64+
self::CONFIG_PATH_QUEUE_DEFAULT_CONNECTION,
65+
'Message queues default connection. Can be db, amqp or a custom one.',
66+
self::DEFAULT_QUEUE_CONNECTION
67+
),
5768
];
5869
}
5970

@@ -72,6 +83,13 @@ public function createConfig(array $data, DeploymentConfig $deploymentConfig)
7283
);
7384
}
7485

86+
if (!$this->isDataEmpty($data, self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION)) {
87+
$configData->set(
88+
self::CONFIG_PATH_QUEUE_DEFAULT_CONNECTION,
89+
$data[self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION]
90+
);
91+
}
92+
7593
return [$configData];
7694
}
7795

app/code/Magento/MysqlMq/Model/ConnectionTypeResolver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
class ConnectionTypeResolver implements ConnectionTypeResolverInterface
1414
{
1515
/**
16-
* DB connection names.
17-
*
1816
* @var string[]
1917
*/
2018
private $dbConnectionNames;
@@ -31,10 +29,10 @@ public function __construct(array $dbConnectionNames = [])
3129
}
3230

3331
/**
34-
* {@inheritdoc}
32+
* @inheritdoc
3533
*/
3634
public function getConnectionType($connectionName)
3735
{
38-
return in_array($connectionName, $this->dbConnectionNames) ? 'db' : null;
36+
return in_array($connectionName, $this->dbConnectionNames, true) ? 'db' : null;
3937
}
4038
}

app/code/Magento/ProductAlert/etc/queue.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="product_alert" exchange="magento-db" type="db">
9+
<broker topic="product_alert" exchange="magento">
1010
<queue name="product_alert.queue" consumer="product_alert"/>
1111
</broker>
1212
</config>

app/code/Magento/ProductAlert/etc/queue_consumer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
9-
<consumer name="product_alert" queue="product_alert.queue" connection="db"/>
9+
<consumer name="product_alert" queue="product_alert.queue"/>
1010
</config>

app/code/Magento/SalesRule/etc/queue.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
9-
<broker topic="sales_rule.codegenerator" exchange="magento-db" type="db">
10-
<queue name="codegenerator" consumer="codegeneratorProcessor" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\SalesRule\Model\Coupon\Consumer::process"/>
9+
<broker topic="sales_rule.codegenerator" exchange="magento">
10+
<queue name="codegenerator" consumer="codegeneratorProcessor" handler="Magento\SalesRule\Model\Coupon\Consumer::process"/>
1111
</broker>
12-
<broker topic="sales.rule.update.coupon.usage" exchange="magento-db" type="db">
13-
<queue name="sales.rule.update.coupon.usage" consumer="sales.rule.update.coupon.usage" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\SalesRule\Model\CouponUsageConsumer::process"/>
12+
<broker topic="sales.rule.update.coupon.usage" exchange="magento">
13+
<queue name="sales.rule.update.coupon.usage" consumer="sales.rule.update.coupon.usage" handler="Magento\SalesRule\Model\CouponUsageConsumer::process"/>
1414
</broker>
1515
</config>

0 commit comments

Comments
 (0)