Skip to content

Commit dba4d1a

Browse files
committed
MCP-826: Use RabbitMQ for all consumers if AMQP is set in deployment config
- Fix static tests;
1 parent d4cd17a commit dba4d1a

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getOptions()
6262
self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION,
6363
TextConfigOption::FRONTEND_WIZARD_TEXT,
6464
self::CONFIG_PATH_QUEUE_DEFAULT_CONNECTION,
65-
'Default queue connection. Can be db, amqp or a custom one.',
65+
'Message queues default connection. Can be db, amqp or a custom one.',
6666
self::DEFAULT_QUEUE_CONNECTION
6767
),
6868
];

lib/internal/Magento/Framework/Amqp/Bulk/Exchange.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function __construct(
5757

5858
/**
5959
* @inheritdoc
60-
* @SuppressWarnings(PHPMD)
6160
*/
6261
public function enqueue($topic, array $envelopes)
6362
{
@@ -77,10 +76,12 @@ public function enqueue($topic, array $envelopes)
7776
$exchange = $publisher->getConnection()->getExchange();
7877

7978
foreach ($envelopes as $envelope) {
79+
// @codingStandardsIgnoreStart
8080
$msg = new AMQPMessage(
8181
$envelope->getBody(),
8282
array_merge(['delivery_mode' => 2], $envelope->getProperties())
8383
);
84+
// @codingStandardsIgnoreEnd
8485
$channel->batch_basic_publish($msg, $exchange, $topic);
8586
}
8687
$channel->publish_batch();

lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/Converter/TopicConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ private function processWildcard($topics)
180180
foreach (array_keys($topicDefinitions) as $topicName) {
181181
if (preg_match($pattern, $topicName)) {
182182
if (isset($topics[$topicName])) {
183+
// @codingStandardsIgnoreStart
183184
$topics[$topicName] = array_merge($topics[$topicName], $topics[$wildcardKey]);
185+
// @codingStandardsIgnoreEnd
184186
} else {
185187
$topics[$topicName] = $topics[$wildcardKey];
186188
}

lib/internal/Magento/Framework/MessageQueue/Topology/Config/Xml/Converter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ public function convert($source)
8686
}
8787
}
8888

89+
// @codingStandardsIgnoreStart
8990
if (isset($result[$name . '--' . $connection]['bindings']) && count($bindings) > 0) {
9091
$bindings = array_merge($result[$name . '--' . $connection]['bindings'], $bindings);
9192
}
9293
if (isset($result[$name . '--' . $connection]['arguments']) && count($exchangeArguments) > 0) {
9394
$exchangeArguments = array_merge($result[$name . '--' . $connection]['arguments'], $exchangeArguments);
9495
}
96+
// @codingStandardsIgnoreEnd
9597

9698
$autoDelete = $this->getAttributeValue($exchange, 'autoDelete', false);
9799
$result[$name . '--' . $connection] = [

0 commit comments

Comments
 (0)