-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathschema.json
More file actions
322 lines (322 loc) · 12.2 KB
/
Copy pathschema.json
File metadata and controls
322 lines (322 loc) · 12.2 KB
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
{
"$id": "https://raw.githubusercontent.com/roadrunner-server/amqp/refs/heads/master/schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "roadrunner-amqp",
"description": "The schema contains all the valid configuration parameters for the AMQP plugin for the roadrunner job system.",
"definitions": {
"exchangeV2": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The name of the exchange (version 2 nested key).",
"type": "string",
"default": "amqp.default"
},
"type": {
"description": "The type of exchange (version 2 nested key).",
"type": "string",
"default": "direct",
"enum": [
"direct",
"fanout",
"topic",
"headers"
]
},
"durable": {
"description": "Whether the exchange is durable (version 2 nested key). See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
"type": "boolean",
"default": false
},
"auto_delete": {
"description": "Whether to auto-delete the exchange when the last queue is unbound from it (version 2 nested key). See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
"type": "boolean",
"default": false
},
"declare": {
"description": "Whether to declare the exchange at startup (version 2 nested key).",
"type": "boolean",
"default": true
}
}
},
"queueV2": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/queue"
},
"routing_key": {
"description": "Routing key for the queue (version 2 nested key).",
"type": "string"
},
"durable": {
"type": "boolean",
"default": false,
"description": "Whether the queue is durable (version 2 nested key)."
},
"auto_delete": {
"description": "Whether to auto-delete queues that have had at least one consumer when the last consumer unsubscribes (version 2 nested key).",
"type": "boolean",
"default": false
},
"exclusive": {
"description": "Declare a queue exclusive at the exchange (version 2 nested key).",
"type": "boolean",
"default": false
},
"consumer_id": {
"description": "The unique identifier for the consumer amongst all consumers on this channel (version 2).",
"type": "string",
"default": "roadrunner-<uuid>"
},
"delete_on_stop": {
"type": "boolean",
"default": false,
"description": "Whether to delete the queue when stopping the pipeline (version 2)."
},
"multiple_ack": {
"description": "When multiple ACK is enabled, this delivery and all prior unacknowledged deliveries on the same channel will be acknowledged. This is useful for batch processing of deliveries (version 2).",
"type": "boolean",
"default": false
},
"requeue_on_fail": {
"description": "Whether to use RabbitMQ mechanisms to requeue the job on failure (version 2).",
"type": "boolean",
"default": false
},
"declare": {
"description": "Whether to declare and bind the queue at startup (version 2 nested key).",
"type": "boolean",
"default": true
},
"headers": {
"description": "Queue declare args (version 2 nested key).",
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"type": "string",
"minLength": 1
}
}
}
}
},
"configV2": {
"type": "object",
"additionalProperties": false,
"description": "Dedicated AMQP version 2 pipeline configuration shape (nested exchange/queue options).",
"properties": {
"version": {
"type": "integer",
"enum": [
2
],
"default": 2
},
"priority": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
},
"prefetch": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
},
"redial_timeout": {
"description": "Redial timeout (in seconds). How long to try to reconnect to the AMQP server. Default or zero means 60.",
"type": "integer",
"default": 60
},
"exchange": {
"$ref": "#/definitions/exchangeV2"
},
"queue": {
"$ref": "#/definitions/queueV2"
}
},
"anyOf": [
{
"required": [
"exchange"
]
},
{
"required": [
"queue"
]
}
]
},
"pipeline": {
"type": "object",
"required": [
"driver"
],
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": [
"amqp"
]
},
"config": {
"type": "object",
"additionalProperties": false,
"description": "Configuration options for the AMQP pipeline. For a strict version 2-only shape see `#/definitions/configV2`.",
"properties": {
"version": {
"description": "AMQP pipeline config format version. Use 0/1 (or omit) for legacy flat options, use 2 for nested entity options (`exchange.*` and `queue.*`).",
"type": "integer",
"enum": [
0,
1,
2
],
"default": 1
},
"priority": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
},
"prefetch": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
},
"delete_queue_on_stop": {
"type": "boolean",
"default": false,
"description": "Legacy version 1 flat key. Whether to delete the queue when stopping the pipeline."
},
"queue": {
"description": "The queue name (legacy, version 1) or queue options object (version 2). In version 2, use the object form and treat legacy flat queue keys as ignored.",
"anyOf": [
{
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/queue"
},
{
"$ref": "#/definitions/queueV2"
}
]
},
"exchange": {
"description": "The exchange name (legacy, version 1) or exchange options object (version 2). In version 2, use the object form and treat legacy flat exchange keys as ignored.",
"anyOf": [
{
"type": "string",
"default": "amqp.default"
},
{
"$ref": "#/definitions/exchangeV2"
}
]
},
"redial_timeout": {
"description": "Redial timeout (in seconds). How long to try to reconnect to the AMQP server. Default or zero means 60.",
"type": "integer",
"default": 60
},
"exchange_durable": {
"description": "Legacy version 1 flat key. Whether the exchange is durable. See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
"type": "boolean",
"default": false
},
"durable": {
"type": "boolean",
"default": false,
"description": "Legacy version 1 flat key. Whether the queue is durable."
},
"consumer_id": {
"description": "The unique identifier for the consumer amongst all consumers on this channel (legacy version 1 flat key).",
"type": "string",
"default": "roadrunner-<uuid>"
},
"exchange_auto_delete": {
"description": "Legacy version 1 flat key. Whether to auto-delete the exchange when the last queue is unbound from it. See https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges",
"type": "boolean",
"default": false
},
"queue_auto_delete": {
"description": "Legacy version 1 flat key. Whether to auto-delete queues that have had at least one consumer when the last consumer unsubscribes.",
"type": "boolean",
"default": false
},
"exchange_type": {
"description": "Legacy version 1 flat key. The type of exchange.",
"type": "string",
"default": "direct"
},
"routing_key": {
"description": "Legacy version 1 flat key. Routing key for the queue.",
"type": "string"
},
"exclusive": {
"description": "Legacy version 1 flat key. Declare a queue exclusive at the exchange.",
"type": "boolean",
"default": false
},
"multiple_ack": {
"description": "Legacy version 1 flat key. When multiple ACK is enabled, this delivery and all prior unacknowledged deliveries on the same channel will be acknowledged. This is useful for batch processing of deliveries.",
"type": "boolean",
"default": false
},
"requeue_on_fail": {
"description": "Legacy version 1 flat key. Whether to use RabbitMQ mechanisms to requeue the job on failure.",
"type": "boolean",
"default": false
},
"queue_headers": {
"description": "Legacy version 1 flat key. Queue declare args.",
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
"driver": {
"type": "object",
"additionalProperties": false,
"description": "Configuration options for the AMQP driver.",
"properties": {
"addr": {
"title": "AMQP Server URI",
"description": "AMQP URI to connect to the rabbitmq server. See https://www.rabbitmq.com/uri-spec.html",
"type": "string",
"default": "amqp://guest:guest@127.0.0.1:5672",
"minLength": 1
},
"tls": {
"title": "TLS Configuration",
"type": "object",
"description": "TLS configuration options for AMQP.",
"properties": {
"key": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
},
"cert": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
},
"root_ca": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/root_ca"
},
"client_auth_type": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/ClientAuthType"
}
},
"required": [
"key",
"cert"
]
}
}
}
}
}