Skip to content

Commit 99ddc33

Browse files
committed
MCP-826: Use RabbitMQ for all consumers if AMQP is set in deployment config
- Delete default_connection as a new option for setup:config:set;
1 parent f2e08ea commit 99ddc33

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

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

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
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;
1615

1716
/**
1817
* Deployment configuration consumers options needed for Setup application
@@ -23,19 +22,16 @@ class ConfigOptionsList implements ConfigOptionsListInterface
2322
* Input key for the option
2423
*/
2524
const INPUT_KEY_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES ='consumers-wait-for-messages';
26-
const INPUT_KEY_QUEUE_DEFAULT_CONNECTION ='default-connection';
2725

2826
/**
29-
* Path to the values in the deployment config
27+
* Path to the value in the deployment config
3028
*/
3129
const CONFIG_PATH_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES = 'queue/consumers_wait_for_messages';
32-
const CONFIG_PATH_QUEUE_DEFAULT_CONNECTION = 'queue/default_connection';
3330

3431
/**
3532
* Default value
3633
*/
3734
const DEFAULT_CONSUMERS_WAIT_FOR_MESSAGES = 1;
38-
const DEFAULT_CONNECTION = 'db';
3935

4036
/**
4137
* The available configuration values
@@ -58,13 +54,6 @@ public function getOptions()
5854
'Should consumers wait for a message from the queue? 1 - Yes, 0 - No',
5955
self::DEFAULT_CONSUMERS_WAIT_FOR_MESSAGES
6056
),
61-
new TextConfigOption(
62-
self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION,
63-
TextConfigOption::FRONTEND_WIZARD_TEXT,
64-
self::CONFIG_PATH_QUEUE_DEFAULT_CONNECTION,
65-
'Default queue connection. Can be db, amqp or a custom one.',
66-
self::DEFAULT_CONNECTION
67-
),
6857
];
6958
}
7059

@@ -83,13 +72,6 @@ public function createConfig(array $data, DeploymentConfig $deploymentConfig)
8372
);
8473
}
8574

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-
9375
return [$configData];
9476
}
9577

@@ -105,16 +87,6 @@ public function validate(array $options, DeploymentConfig $deploymentConfig)
10587
$errors[] = 'You can use only 1 or 0 for ' . self::INPUT_KEY_QUEUE_CONSUMERS_WAIT_FOR_MESSAGES . ' option';
10688
}
10789

108-
if ($this->isDataEmpty($options, self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION)) {
109-
$errors[] = self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION . ' option cannot be empty';
110-
}
111-
112-
if (!$this->isDataEmpty($options, self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION)
113-
&& !is_string($options[self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION])) {
114-
$errors[] = 'You can use only string type variable for '
115-
. self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION . ' option';
116-
}
117-
11890
return $errors;
11991
}
12092

dev/tests/integration/etc/post-install-setup-command-config.php.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ return [
1313
'--remote-storage-driver' => 'aws-s3',
1414
'--remote-storage-bucket' => 'myBucket',
1515
'--remote-storage-region' => 'us-east-1',
16-
'--default-connection' => 'db'
1716
]
1817
]
1918
*/

0 commit comments

Comments
 (0)