Skip to content

Commit 77ecaec

Browse files
committed
MCP-826: Use RabbitMQ for all consumers if AMQP is set in deployment config
- Make amqp as a default connection for remote service reader;
1 parent d3b1e1d commit 77ecaec

File tree

1 file changed

+3
-16
lines changed
  • app/code/Magento/WebapiAsync/Code/Generator/Config/RemoteServiceReader

1 file changed

+3
-16
lines changed

app/code/Magento/WebapiAsync/Code/Generator/Config/RemoteServiceReader/Publisher.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
namespace Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader;
1010

1111
use Magento\AsynchronousOperations\Model\ConfigInterface as WebApiAsyncConfig;
12-
use Magento\Framework\App\ObjectManager;
13-
use Magento\Framework\MessageQueue\DefaultValueProvider;
1412

1513
/**
1614
* Remote service reader with auto generated configuration for queue_publisher.xml
@@ -22,26 +20,15 @@ class Publisher implements \Magento\Framework\Config\ReaderInterface
2220
*/
2321
private $webapiAsyncConfig;
2422

25-
/**
26-
* Default value provider.
27-
*
28-
* @var DefaultValueProvider
29-
*/
30-
private $defaultValueProvider;
31-
3223
/**
3324
* Initialize dependencies.
3425
*
3526
* @param WebApiAsyncConfig $webapiAsyncConfig
36-
* @param DefaultValueProvider|null $defaultValueProvider
3727
*/
3828
public function __construct(
39-
WebApiAsyncConfig $webapiAsyncConfig,
40-
DefaultValueProvider $defaultValueProvider = null
29+
WebApiAsyncConfig $webapiAsyncConfig
4130
) {
4231
$this->webapiAsyncConfig = $webapiAsyncConfig;
43-
$this->defaultValueProvider = $defaultValueProvider
44-
?? ObjectManager::getInstance()->get(DefaultValueProvider::class);
4532
}
4633

4734
/**
@@ -62,8 +49,8 @@ public function read($scope = null)
6249
'topic' => $topicName,
6350
'disabled' => false,
6451
'connections' => [
65-
$this->defaultValueProvider->getConnection() => [
66-
'name' => $this->defaultValueProvider->getConnection(),
52+
'amqp' => [
53+
'name' => 'amqp',
6754
'exchange' => 'magento',
6855
'disabled' => false,
6956
],

0 commit comments

Comments
 (0)