rascal 14.1.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.2.0
4
+
5
+ - Add json schema (lib/config/schema.json) - See https://github.com/guidesmiths/rascal/issues/168
6
+
3
7
  ## 14.1.0
4
8
 
5
9
  - Adds support for custom user agents - See https://github.com/guidesmiths/rascal/issues/170
package/README.md CHANGED
@@ -273,10 +273,11 @@ The most common configuration options are
273
273
  - [publications](#publications)
274
274
  - [subscriptions](#subscriptions)
275
275
 
276
- A simple configuration is shown below.
276
+ A simple configuration is shown below. You can reference Rascal's JSON schema from the config to enable validation and suggestions in compatible IDEs.
277
277
 
278
278
  ```json
279
279
  {
280
+ "$schema": "./node_modules/rascal/lib/config/schema.json",
280
281
  "vhosts": {
281
282
  "/": {
282
283
  "connection": {
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "../../lib/config/schema.json",
3
+ "vhosts": {
4
+ "/": {
5
+ "publicationChannelPools": {
6
+ "confirmPool": {
7
+ "max": 10,
8
+ "min": 10,
9
+ "evictionRunIntervalMillis": 1000,
10
+ "idleTimeoutMillis": 5000,
11
+ "autostart": true
12
+ }
13
+ },
14
+ "connection": {
15
+ "heartbeat": 5,
16
+ "socketOptions": {
17
+ "timeout": 1000
18
+ }
19
+ },
20
+ "exchanges": ["demo_ex"],
21
+ "queues": ["demo_q"],
22
+ "bindings": ["demo_ex[a.b.c] -> demo_q"],
23
+ "publications": {
24
+ "demo_pub": {
25
+ "exchange": "demo_ex",
26
+ "routingKey": "a.b.c",
27
+ "confirm": false,
28
+ "options": {
29
+ "persistent": false
30
+ }
31
+ }
32
+ },
33
+ "subscriptions": {
34
+ "demo_sub": {
35
+ "queue": "demo_q"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "../../lib/config/schema.json",
3
+ "vhosts": {
4
+ "/": {
5
+ "connection": {
6
+ "heartbeat": 1,
7
+ "socketOptions": {
8
+ "timeout": 1000
9
+ }
10
+ },
11
+ "exchanges": [""],
12
+ "queues": ["demo_q"],
13
+ "publications": {
14
+ "demo_pub": {
15
+ "exchange": ""
16
+ }
17
+ },
18
+ "subscriptions": {
19
+ "demo_sub": {
20
+ "queue": "demo_q"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "../../lib/config/schema.json",
3
+ "vhosts": {
4
+ "/": {
5
+ "exchanges": ["demo_ex"],
6
+ "queues": ["demo_q"],
7
+ "bindings": ["demo_ex[a.b.c] -> demo_q"],
8
+ "publications": {
9
+ "demo_pub": {
10
+ "exchange": "demo_ex",
11
+ "routingKey": "a.b.c"
12
+ }
13
+ },
14
+ "subscriptions": {
15
+ "demo_sub": {
16
+ "queue": "demo_q"
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "../../lib/config/schema.json",
3
+ "vhosts": {
4
+ "/": {
5
+ "connection": {
6
+ "heartbeat": 1,
7
+ "socketOptions": {
8
+ "timeout": 1000
9
+ }
10
+ },
11
+ "exchanges": ["demo_ex"],
12
+ "queues": ["demo_q"],
13
+ "bindings": ["demo_ex[a.b.c] -> demo_q"],
14
+ "publications": {
15
+ "demo_pub": {
16
+ "exchange": "demo_ex",
17
+ "routingKey": "a.b.c"
18
+ }
19
+ },
20
+ "subscriptions": {
21
+ "demo_sub": {
22
+ "queue": "demo_q"
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "../../lib/config/schema.json",
3
+ "vhosts": {
4
+ "/": {
5
+ "publicationChannelPools": {
6
+ "confirmPool": {
7
+ "autostart": true
8
+ }
9
+ },
10
+ "connection": {
11
+ "options": {
12
+ "heartbeat": 10
13
+ },
14
+ "socketOptions": {
15
+ "timeout": 1000
16
+ }
17
+ },
18
+ "exchanges": ["demo_ex"],
19
+ "queues": ["demo_q"],
20
+ "bindings": ["demo_ex[a.b.c] -> demo_q"],
21
+ "publications": {
22
+ "demo_pub": {
23
+ "exchange": "demo_ex",
24
+ "routingKey": "a.b.c",
25
+ "options": {
26
+ "persistent": false
27
+ }
28
+ }
29
+ },
30
+ "subscriptions": {
31
+ "demo_sub": {
32
+ "queue": "demo_q"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,686 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "vhosts": {
6
+ "type": "object",
7
+ "patternProperties": {
8
+ ".*": {
9
+ "$ref": "#/definitions/vhost"
10
+ }
11
+ }
12
+ },
13
+ "publications": {
14
+ "type": "object",
15
+ "patternProperties": {
16
+ ".*": {
17
+ "$ref": "#/definitions/publication"
18
+ }
19
+ }
20
+ },
21
+ "subscriptions": {
22
+ "type": "object",
23
+ "patternProperties": {
24
+ ".*": {
25
+ "$ref": "#/definitions/subscription"
26
+ }
27
+ }
28
+ },
29
+ "redeliveries": {
30
+ "$ref": "#/definitions/redeliveries"
31
+ },
32
+ "encryption": {
33
+ "type": "object",
34
+ "patternProperties": {
35
+ ".*": {
36
+ "$ref": "#/definitions/encryption"
37
+ }
38
+ }
39
+ }
40
+ },
41
+ "definitions": {
42
+ "vhost": {
43
+ "type": "object",
44
+ "properties": {
45
+ "assert": {
46
+ "type": "boolean"
47
+ },
48
+ "check": {
49
+ "type": "boolean"
50
+ },
51
+ "connectionStrategy": {
52
+ "type": "string",
53
+ "enum": ["random", "fixed"]
54
+ },
55
+ "connection": {
56
+ "$ref": "#/definitions/connection"
57
+ },
58
+ "connections": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/definitions/connection"
62
+ }
63
+ },
64
+ "exchanges": {
65
+ "oneOf": [
66
+ {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ {
73
+ "type": "object",
74
+ "patternProperties": {
75
+ ".*": {
76
+ "$ref": "#/definitions/exchange"
77
+ }
78
+ }
79
+ }
80
+ ]
81
+ },
82
+ "queues": {
83
+ "oneOf": [
84
+ {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ {
91
+ "type": "object",
92
+ "patternProperties": {
93
+ ".*": {
94
+ "$ref": "#/definitions/queue"
95
+ }
96
+ }
97
+ }
98
+ ]
99
+ },
100
+ "bindings": {
101
+ "oneOf": [
102
+ {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ {
109
+ "type": "object",
110
+ "patternProperties": {
111
+ ".*": {
112
+ "$ref": "#/definitions/binding"
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ "publications": {
119
+ "type": "object",
120
+ "patternProperties": {
121
+ ".*": {
122
+ "$ref": "#/definitions/publication"
123
+ }
124
+ }
125
+ },
126
+ "subscriptions": {
127
+ "type": "object",
128
+ "patternProperties": {
129
+ ".*": {
130
+ "$ref": "#/definitions/subscription"
131
+ }
132
+ }
133
+ },
134
+ "publicationChannelPools": {
135
+ "type": "object",
136
+ "properties": {
137
+ "regularPool": {
138
+ "$ref": "#/definitions/channelPool"
139
+ },
140
+ "confirmPool": {
141
+ "$ref": "#/definitions/channelPool"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "channelPool": {
148
+ "type": "object",
149
+ "properties": {
150
+ "autostart": {
151
+ "type": "boolean"
152
+ },
153
+ "max": {
154
+ "type": "integer",
155
+ "minimum": 0
156
+ },
157
+ "min": {
158
+ "type": "integer",
159
+ "minimum": 0
160
+ },
161
+ "evictionRunIntervalMillis": {
162
+ "type": "integer",
163
+ "minimum": 0
164
+ },
165
+ "idleTimeoutMillis": {
166
+ "type": "integer",
167
+ "minimum": 0
168
+ },
169
+ "rejectionDelayMillis": {
170
+ "type": "integer",
171
+ "minimum": 0
172
+ },
173
+ "testOnBorrow": {
174
+ "type": "boolean"
175
+ },
176
+ "acquireTimeoutMillis": {
177
+ "type": "integer",
178
+ "minimum": 0
179
+ },
180
+ "destroyTimeoutMillis": {
181
+ "type": "integer",
182
+ "minimum": 0
183
+ }
184
+ }
185
+ },
186
+ "connection": {
187
+ "anyOf": [
188
+ {
189
+ "type": "string"
190
+ },
191
+ {
192
+ "type": "object",
193
+ "properties": {
194
+ "url": {
195
+ "type": "string"
196
+ },
197
+ "options": {
198
+ "$ref": "#/definitions/connectOptions"
199
+ },
200
+ "socketOptions": {
201
+ "$ref": "#/definitions/socketOptions"
202
+ },
203
+ "retry": {
204
+ "$ref": "#/definitions/retry"
205
+ },
206
+ "management": {
207
+ "$ref": "#/definitions/management"
208
+ }
209
+ }
210
+ },
211
+ {
212
+ "type": "object",
213
+ "properties": {
214
+ "protocol": {
215
+ "type": "string",
216
+ "enum": ["amqp", "amqps"]
217
+ },
218
+ "hostname": {
219
+ "type": "string"
220
+ },
221
+ "user": {
222
+ "type": "string"
223
+ },
224
+ "password": {
225
+ "type": "string"
226
+ },
227
+ "port": {
228
+ "type": "integer",
229
+ "minimum": 1
230
+ },
231
+ "vhost": {
232
+ "type": "string"
233
+ },
234
+ "options": {
235
+ "$ref": "#/definitions/connectOptions"
236
+ },
237
+ "socketOptions": {
238
+ "type": "object"
239
+ },
240
+ "retry": {
241
+ "$ref": "#/definitions/retry"
242
+ },
243
+ "management": {
244
+ "$ref": "#/definitions/management"
245
+ }
246
+ }
247
+ }
248
+ ]
249
+ },
250
+ "connectOptions": {
251
+ "type": "object",
252
+ "properties": {
253
+ "frameMax": {
254
+ "type": "integer",
255
+ "minimum": 0
256
+ },
257
+ "heartbeat": {
258
+ "type": "integer",
259
+ "minimum": 0
260
+ },
261
+ "connection_timeout": {
262
+ "type": "integer",
263
+ "minimum": 0
264
+ },
265
+ "channelMax": {
266
+ "type": "integer",
267
+ "minimum": 0
268
+ }
269
+ }
270
+ },
271
+ "socketOptions": {
272
+ "type": "object",
273
+ "properties": {
274
+ "timeout": {
275
+ "type": "integer",
276
+ "minimum": 0
277
+ }
278
+ }
279
+ },
280
+ "management": {
281
+ "anyOf": [
282
+ {
283
+ "type": "object",
284
+ "properties": {
285
+ "url": {
286
+ "type": "string"
287
+ },
288
+ "options": {
289
+ "type": "object",
290
+ "properties": {
291
+ "timeout": {
292
+ "type": "integer",
293
+ "minimum": 0
294
+ }
295
+ }
296
+ }
297
+ }
298
+ },
299
+ {
300
+ "type": "object",
301
+ "properties": {
302
+ "protocol": {
303
+ "type": "string",
304
+ "enum": ["http", "https"]
305
+ },
306
+ "hostname": {
307
+ "type": "string"
308
+ },
309
+ "user": {
310
+ "type": "string"
311
+ },
312
+ "password": {
313
+ "type": "string"
314
+ },
315
+ "port": {
316
+ "type": "integer",
317
+ "minimum": 1
318
+ },
319
+ "options": {
320
+ "type": "object",
321
+ "properties": {
322
+ "timeout": {
323
+ "type": "integer",
324
+ "minimum": 0
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+ ]
331
+ },
332
+ "exchange": {
333
+ "type": "object",
334
+ "properties": {
335
+ "name": {
336
+ "type": "string"
337
+ },
338
+ "assert": {
339
+ "type": "boolean"
340
+ },
341
+ "check": {
342
+ "type": "boolean"
343
+ },
344
+ "type": {
345
+ "type": "string"
346
+ },
347
+ "options": {
348
+ "type": "object",
349
+ "properties": {
350
+ "durable": {
351
+ "type": "boolean"
352
+ },
353
+ "internal": {
354
+ "type": "boolean"
355
+ },
356
+ "autoDelete": {
357
+ "type": "boolean"
358
+ },
359
+ "alternateExchange": {
360
+ "type": "string"
361
+ },
362
+ "expires": {
363
+ "type": "integer",
364
+ "minimum": 0
365
+ },
366
+ "arguments": {
367
+ "type": "object"
368
+ }
369
+ }
370
+ }
371
+ }
372
+ },
373
+ "queue": {
374
+ "type": "object",
375
+ "properties": {
376
+ "name": {
377
+ "type": "string"
378
+ },
379
+ "assert": {
380
+ "type": "boolean"
381
+ },
382
+ "check": {
383
+ "type": "boolean"
384
+ },
385
+ "type": {
386
+ "type": "string"
387
+ },
388
+ "purge": {
389
+ "type": "boolean"
390
+ },
391
+ "options": {
392
+ "type": "object",
393
+ "properties": {
394
+ "exclusive": {
395
+ "type": "boolean"
396
+ },
397
+ "durable": {
398
+ "type": "boolean"
399
+ },
400
+ "autoDelete": {
401
+ "type": "boolean"
402
+ },
403
+ "messageTtl": {
404
+ "type": "integer",
405
+ "minimum": 0
406
+ },
407
+ "expires": {
408
+ "type": "integer",
409
+ "minimum": 0
410
+ },
411
+ "deadLetterExchange": {
412
+ "type": "string"
413
+ },
414
+ "deadLetterRoutingKey": {
415
+ "type": "string"
416
+ },
417
+ "maxLength": {
418
+ "type": "integer",
419
+ "minimum": 0
420
+ },
421
+ "maxPriority": {
422
+ "type": "integer",
423
+ "minimum": 0
424
+ },
425
+ "arguments": {
426
+ "type": "object"
427
+ }
428
+ }
429
+ }
430
+ }
431
+ },
432
+ "binding": {
433
+ "type": "object",
434
+ "properties": {
435
+ "name": {
436
+ "type": "string"
437
+ },
438
+ "source": {
439
+ "type": "string"
440
+ },
441
+ "destination": {
442
+ "type": "string"
443
+ },
444
+ "destinationType": {
445
+ "type": "string",
446
+ "enum": ["queue", "exchange"]
447
+ },
448
+ "bindingKey": {
449
+ "type": "string"
450
+ },
451
+ "bindingKeys": {
452
+ "type": "array",
453
+ "items": {
454
+ "type": "string"
455
+ }
456
+ },
457
+ "qualifyBindingKeys": {
458
+ "type": "boolean"
459
+ },
460
+ "options": {
461
+ "type": "object"
462
+ }
463
+ }
464
+ },
465
+ "publication": {
466
+ "type": "object",
467
+ "properties": {
468
+ "name": {
469
+ "type": "string"
470
+ },
471
+ "vhost": {
472
+ "type": "string"
473
+ },
474
+ "exchange": {
475
+ "type": "string"
476
+ },
477
+ "queue": {
478
+ "type": "string"
479
+ },
480
+ "routingKey": {
481
+ "type": "string"
482
+ },
483
+ "confirm": {
484
+ "type": "boolean"
485
+ },
486
+ "timeout": {
487
+ "type": "integer",
488
+ "minimum": 0
489
+ },
490
+ "encryption": {
491
+ "type": "string"
492
+ },
493
+ "options": {
494
+ "type": "object",
495
+ "properties": {
496
+ "expiration": {
497
+ "type": "string"
498
+ },
499
+ "userId": {
500
+ "type": "string"
501
+ },
502
+ "CC": {
503
+ "oneOf": [
504
+ {
505
+ "type": "string"
506
+ },
507
+ {
508
+ "type": "array",
509
+ "items": {
510
+ "type": "string"
511
+ }
512
+ }
513
+ ]
514
+ },
515
+ "BCC": {
516
+ "oneOf": [
517
+ {
518
+ "type": "string"
519
+ },
520
+ {
521
+ "type": "array",
522
+ "items": {
523
+ "type": "string"
524
+ }
525
+ }
526
+ ]
527
+ },
528
+ "priority": {
529
+ "type": "integer",
530
+ "minimum": 0
531
+ },
532
+ "persistent": {
533
+ "type": "boolean"
534
+ },
535
+ "mandatory": {
536
+ "type": "boolean"
537
+ },
538
+ "contentType": {
539
+ "type": "string"
540
+ },
541
+ "contentEncoding": {
542
+ "type": "string"
543
+ },
544
+ "headers": {
545
+ "type": "object"
546
+ },
547
+ "replyTo": {
548
+ "type": "string"
549
+ },
550
+ "type": {
551
+ "type": "string"
552
+ },
553
+ "appId": {
554
+ "type": "string"
555
+ }
556
+ }
557
+ }
558
+ }
559
+ },
560
+ "subscription": {
561
+ "type": "object",
562
+ "properties": {
563
+ "name": {
564
+ "type": "string"
565
+ },
566
+ "vhost": {
567
+ "type": "string"
568
+ },
569
+ "queue": {
570
+ "type": "string"
571
+ },
572
+ "contentType": {
573
+ "type": "string"
574
+ },
575
+ "prefetch": {
576
+ "type": "integer",
577
+ "minimum": 0
578
+ },
579
+ "retry": {
580
+ "$ref": "#/definitions/retry"
581
+ },
582
+ "redeliveries": {
583
+ "properties": {
584
+ "limit": {
585
+ "type": "integer",
586
+ "minimum": 0
587
+ },
588
+ "timeout": {
589
+ "type": "integer",
590
+ "minimum": 0
591
+ },
592
+ "counter": {
593
+ "type": "string"
594
+ }
595
+ }
596
+ },
597
+ "closeTimeout": {
598
+ "type": "integer",
599
+ "minimum": 0
600
+ },
601
+ "encryption": {
602
+ "type": "string"
603
+ },
604
+ "promisifyAckOrNack": {
605
+ "type": "boolean"
606
+ },
607
+ "options": {
608
+ "type": "object",
609
+ "properties": {
610
+ "noAck": {
611
+ "type": "boolean"
612
+ },
613
+ "exclusive": {
614
+ "type": "boolean"
615
+ },
616
+ "priority": {
617
+ "type": "integer",
618
+ "minimum": 0
619
+ },
620
+ "arguments": {
621
+ "type": "object"
622
+ }
623
+ }
624
+ }
625
+ }
626
+ },
627
+ "shovel": {
628
+ "type": "object",
629
+ "properties": {
630
+ "name": {
631
+ "type": "string"
632
+ },
633
+ "subscription": {
634
+ "type": "string"
635
+ },
636
+ "publication": {
637
+ "type": "string"
638
+ }
639
+ }
640
+ },
641
+ "retry": {
642
+ "type": "object",
643
+ "properties": {
644
+ "min": {
645
+ "type": "integer",
646
+ "minimum": 0
647
+ },
648
+ "max": {
649
+ "type": "integer",
650
+ "minimum": 0
651
+ },
652
+ "factor": {
653
+ "type": "number",
654
+ "minimum": 0
655
+ },
656
+ "strategy": {
657
+ "type": "string",
658
+ "enum": ["exponential", "linear"]
659
+ }
660
+ }
661
+ },
662
+ "redeliveries": {
663
+ "type": "object",
664
+ "properties": {
665
+ "counters": {
666
+ "type": "object"
667
+ }
668
+ }
669
+ },
670
+ "encryption": {
671
+ "type": "object",
672
+ "properties": {
673
+ "key": {
674
+ "type": "string"
675
+ },
676
+ "algorithm": {
677
+ "type": "string"
678
+ },
679
+ "ivLength": {
680
+ "type": "integer",
681
+ "minimum": 1
682
+ }
683
+ }
684
+ }
685
+ }
686
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rascal",
3
- "version": "14.1.0",
3
+ "version": "14.2.0",
4
4
  "description": "A config driven wrapper for amqplib supporting multi-host connections, automatic error recovery, redelivery flood protection, transparent encryption / decryption, channel pooling and publication timeouts",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -1,39 +0,0 @@
1
- module.exports = {
2
- vhosts: {
3
- '/': {
4
- publicationChannelPools: {
5
- confirmPool: {
6
- max: 10,
7
- min: 10,
8
- evictionRunIntervalMillis: 1000,
9
- idleTimeoutMillis: 5000,
10
- autostart: true,
11
- },
12
- },
13
- connection: {
14
- heartbeat: 5,
15
- socketOptions: {
16
- timeout: 1000,
17
- },
18
- },
19
- exchanges: ['demo_ex'],
20
- queues: ['demo_q'],
21
- bindings: ['demo_ex[a.b.c] -> demo_q'],
22
- publications: {
23
- demo_pub: {
24
- exchange: 'demo_ex',
25
- routingKey: 'a.b.c',
26
- confirm: false,
27
- options: {
28
- persistent: false,
29
- },
30
- },
31
- },
32
- subscriptions: {
33
- demo_sub: {
34
- queue: 'demo_q',
35
- },
36
- },
37
- },
38
- },
39
- };
@@ -1,24 +0,0 @@
1
- module.exports = {
2
- vhosts: {
3
- '/': {
4
- connection: {
5
- heartbeat: 1,
6
- socketOptions: {
7
- timeout: 1000,
8
- },
9
- },
10
- exchanges: [''],
11
- queues: ['demo_q'],
12
- publications: {
13
- demo_pub: {
14
- exchange: '',
15
- },
16
- },
17
- subscriptions: {
18
- demo_sub: {
19
- queue: 'demo_q',
20
- },
21
- },
22
- },
23
- },
24
- };
@@ -1,20 +0,0 @@
1
- module.exports = {
2
- vhosts: {
3
- '/': {
4
- exchanges: ['demo_ex'],
5
- queues: ['demo_q'],
6
- bindings: ['demo_ex[a.b.c] -> demo_q'],
7
- publications: {
8
- demo_pub: {
9
- exchange: 'demo_ex',
10
- routingKey: 'a.b.c',
11
- },
12
- },
13
- subscriptions: {
14
- demo_sub: {
15
- queue: 'demo_q',
16
- },
17
- },
18
- },
19
- },
20
- };
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- vhosts: {
3
- '/': {
4
- connection: {
5
- heartbeat: 1,
6
- socketOptions: {
7
- timeout: 1000,
8
- },
9
- },
10
- exchanges: ['demo_ex'],
11
- queues: ['demo_q'],
12
- bindings: ['demo_ex[a.b.c] -> demo_q'],
13
- publications: {
14
- demo_pub: {
15
- exchange: 'demo_ex',
16
- routingKey: 'a.b.c',
17
- },
18
- },
19
- subscriptions: {
20
- demo_sub: {
21
- queue: 'demo_q',
22
- },
23
- },
24
- },
25
- },
26
- };
@@ -1,36 +0,0 @@
1
- module.exports = {
2
- vhosts: {
3
- '/': {
4
- publicationChannelPools: {
5
- confirmPool: {
6
- autostart: true,
7
- },
8
- },
9
- connection: {
10
- options: {
11
- heartbeat: 10,
12
- },
13
- socketOptions: {
14
- timeout: 1000,
15
- },
16
- },
17
- exchanges: ['demo_ex'],
18
- queues: ['demo_q'],
19
- bindings: ['demo_ex[a.b.c] -> demo_q'],
20
- publications: {
21
- demo_pub: {
22
- exchange: 'demo_ex',
23
- routingKey: 'a.b.c',
24
- options: {
25
- persistent: false,
26
- },
27
- },
28
- },
29
- subscriptions: {
30
- demo_sub: {
31
- queue: 'demo_q',
32
- },
33
- },
34
- },
35
- },
36
- };