-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathConfigInterface.php
187 lines (163 loc) · 5.43 KB
/
ConfigInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\MessageQueue;
use Magento\Framework\Exception\LocalizedException;
/**
* @deprecated 103.0.0
*/
interface ConfigInterface
{
const PUBLISHERS = 'publishers';
const PUBLISHER_NAME = 'name';
const PUBLISHER_CONNECTION = 'connection';
const PUBLISHER_EXCHANGE = 'exchange';
const TOPICS = 'topics';
const TOPIC_NAME = 'name';
const TOPIC_PUBLISHER = 'publisher';
const TOPIC_SCHEMA = 'schema';
const TOPIC_RESPONSE_SCHEMA = 'response_schema';
const TOPIC_SCHEMA_TYPE = 'schema_type';
const TOPIC_SCHEMA_VALUE = 'schema_value';
const TOPIC_SCHEMA_TYPE_OBJECT = 'object';
const TOPIC_SCHEMA_TYPE_METHOD = 'method_arguments';
const SCHEMA_METHOD_PARAM_NAME = 'param_name';
const SCHEMA_METHOD_PARAM_POSITION = 'param_position';
const SCHEMA_METHOD_PARAM_TYPE = 'param_type';
const SCHEMA_METHOD_PARAM_IS_REQUIRED = 'is_required';
const CONSUMERS = 'consumers';
const CONSUMER_NAME = 'name';
const CONSUMER_QUEUE = 'queue';
const CONSUMER_CONNECTION = 'connection';
const CONSUMER_INSTANCE_TYPE = 'instance_type';
const CONSUMER_CLASS = 'type';
const CONSUMER_METHOD = 'method';
const CONSUMER_MAX_MESSAGES = 'max_messages';
const CONSUMER_HANDLERS = 'handlers';
const CONSUMER_HANDLER_TYPE = 'type';
const CONSUMER_HANDLER_METHOD = 'method';
const CONSUMER_TYPE = 'consumer_type';
const CONSUMER_TYPE_SYNC = 'sync';
const CONSUMER_TYPE_ASYNC = 'async';
const RESPONSE_QUEUE_PREFIX = 'responseQueue.';
const BINDS = 'binds';
const BIND_QUEUE = 'queue';
const BIND_EXCHANGE = 'exchange';
const BIND_TOPIC = 'topic';
const BROKER_TOPIC = 'topic';
const BROKER_TYPE = 'type';
const BROKER_EXCHANGE = 'exchange';
const BROKER_CONSUMERS = 'consumers';
const BROKER_CONSUMER_NAME = 'name';
const BROKER_CONSUMER_QUEUE = 'queue';
const BROKER_CONSUMER_INSTANCE_TYPE = 'instance_type';
const BROKER_CONSUMER_MAX_MESSAGES = 'max_messages';
const BROKERS = 'brokers';
/**
* Map which allows optimized search of queues corresponding to the specified exchange and topic pair.
*/
const EXCHANGE_TOPIC_TO_QUEUES_MAP = 'exchange_topic_to_queues_map';
/**
* Identify configured exchange for the provided topic.
*
* @param string $topicName
* @return string
* @throws LocalizedException
* @see \Magento\Framework\MessageQueue\Publisher\ConfigInterface::getPublisher
*/
public function getExchangeByTopic($topicName);
/**
* Identify a list of all queue names corresponding to the specified topic (and implicitly exchange).
*
* @param string $topic
* @return string[]
* @throws LocalizedException
* @see \Magento\Framework\MessageQueue\Topology\ConfigInterface::getQueues
*/
public function getQueuesByTopic($topic);
/**
* @param string $topic
* @return string
* @throws LocalizedException
* @see \Magento\Framework\MessageQueue\Publisher\ConfigInterface::getPublisher
*/
public function getConnectionByTopic($topic);
/**
* @param string $consumer
* @return string
* @throws LocalizedException
* @see \Magento\Framework\MessageQueue\Consumer\ConfigInterface::getConsumer
*/
public function getConnectionByConsumer($consumer);
/**
* Identify which option is used to define message schema: data interface or service method params
*
* @param string $topic
* @return string
* @see \Magento\Framework\Communication\ConfigInterface::getTopic
*/
public function getMessageSchemaType($topic);
/**
* Get all consumer names
*
* @return string[]
* @see \Magento\Framework\MessageQueue\Consumer\ConfigInterface::getConsumers
*/
public function getConsumerNames();
/**
* Get consumer configuration
*
* @param string $name
* @return array|null
* @see \Magento\Framework\MessageQueue\Consumer\ConfigInterface::getConsumer
*/
public function getConsumer($name);
/**
* Get queue binds
*
* @return array
* @see \Magento\Framework\MessageQueue\Topology\ConfigInterface::getExchanges
*/
public function getBinds();
/**
* Get publishers
*
* @return array
* @see \Magento\Framework\MessageQueue\Publisher\ConfigInterface::getPublishers
*/
public function getPublishers();
/**
* Get consumers
*
* @return array
* @see \Magento\Framework\MessageQueue\Consumer\ConfigInterface::getConsumers
*/
public function getConsumers();
/**
* Get topic config
*
* @param string $name
* @return array
* @see \Magento\Framework\Communication\ConfigInterface::getTopic
* @see \Magento\Framework\MessageQueue\Publisher\ConfigInterface::getPublisher
*/
public function getTopic($name);
/**
* Get published config
* @param string $name
*
* @return array
* @see \Magento\Framework\MessageQueue\Publisher\ConfigInterface::getPublisher
*/
public function getPublisher($name);
/**
* Get queue name for response
*
* @param string $topicName
* @return string
* @see \Magento\Framework\MessageQueue\Rpc\ResponseQueueNameBuilder::getQueueName
*/
public function getResponseQueueName($topicName);
}