rascal 13.1.3 → 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.
Files changed (69) hide show
  1. package/.prettierrc.json +4 -1
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +200 -209
  4. package/examples/advanced/cluster.js +4 -4
  5. package/examples/advanced/config.js +45 -50
  6. package/examples/advanced/handlers/deleteUser.js +9 -16
  7. package/examples/advanced/handlers/saveUser.js +11 -18
  8. package/examples/advanced/index.js +81 -103
  9. package/examples/busy-publisher/config.json +40 -0
  10. package/examples/busy-publisher/index.js +14 -20
  11. package/examples/default-exchange/config.json +25 -0
  12. package/examples/default-exchange/index.js +10 -15
  13. package/examples/mocha/config.json +21 -0
  14. package/examples/mocha/test.js +16 -24
  15. package/examples/promises/config.json +27 -0
  16. package/examples/promises/index.js +9 -14
  17. package/examples/simple/config.json +37 -0
  18. package/examples/simple/index.js +11 -15
  19. package/index.js +6 -6
  20. package/lib/amqp/Broker.js +65 -95
  21. package/lib/amqp/BrokerAsPromised.js +7 -16
  22. package/lib/amqp/Publication.js +72 -212
  23. package/lib/amqp/PublicationSession.js +8 -8
  24. package/lib/amqp/SubscriberError.js +107 -233
  25. package/lib/amqp/SubscriberSession.js +56 -76
  26. package/lib/amqp/SubscriberSessionAsPromised.js +3 -3
  27. package/lib/amqp/Subscription.js +96 -313
  28. package/lib/amqp/Vhost.js +120 -265
  29. package/lib/amqp/tasks/applyBindings.js +12 -42
  30. package/lib/amqp/tasks/assertExchanges.js +6 -11
  31. package/lib/amqp/tasks/assertQueues.js +4 -4
  32. package/lib/amqp/tasks/assertVhost.js +6 -4
  33. package/lib/amqp/tasks/checkExchanges.js +4 -4
  34. package/lib/amqp/tasks/checkQueues.js +4 -4
  35. package/lib/amqp/tasks/checkVhost.js +6 -4
  36. package/lib/amqp/tasks/closeChannel.js +3 -3
  37. package/lib/amqp/tasks/closeConnection.js +3 -3
  38. package/lib/amqp/tasks/createChannel.js +3 -3
  39. package/lib/amqp/tasks/createConnection.js +38 -53
  40. package/lib/amqp/tasks/deleteExchanges.js +5 -5
  41. package/lib/amqp/tasks/deleteQueues.js +4 -4
  42. package/lib/amqp/tasks/deleteVhost.js +12 -16
  43. package/lib/amqp/tasks/index.js +25 -25
  44. package/lib/amqp/tasks/initCounters.js +5 -6
  45. package/lib/amqp/tasks/initPublications.js +4 -4
  46. package/lib/amqp/tasks/initShovels.js +15 -20
  47. package/lib/amqp/tasks/initSubscriptions.js +5 -11
  48. package/lib/amqp/tasks/initVhosts.js +8 -8
  49. package/lib/amqp/tasks/purgeQueues.js +4 -4
  50. package/lib/backoff/exponential.js +6 -8
  51. package/lib/backoff/index.js +2 -2
  52. package/lib/backoff/linear.js +3 -3
  53. package/lib/config/baseline.js +15 -16
  54. package/lib/config/configure.js +68 -193
  55. package/lib/config/fqn.js +3 -3
  56. package/lib/config/schema.json +686 -0
  57. package/lib/config/tests.js +3 -3
  58. package/lib/config/validate.js +87 -458
  59. package/lib/counters/inMemory.js +3 -3
  60. package/lib/counters/inMemoryCluster.js +16 -23
  61. package/lib/counters/index.js +3 -3
  62. package/lib/management/Client.js +55 -0
  63. package/package.json +2 -1
  64. package/examples/busy-publisher/config.js +0 -39
  65. package/examples/default-exchange/config.js +0 -24
  66. package/examples/mocha/config.js +0 -20
  67. package/examples/promises/config.js +0 -26
  68. package/examples/simple/config.js +0 -36
  69. package/lib/management/client.js +0 -90
package/.prettierrc.json CHANGED
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "singleQuote": true,
3
+ "printWidth": 300
4
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
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
+
7
+ ## 14.1.0
8
+
9
+ - Adds support for custom user agents - See https://github.com/guidesmiths/rascal/issues/170
10
+
11
+ ## 14.0.1
12
+
13
+ - Fixes https://github.com/guidesmiths/rascal/issues/178
14
+
15
+ ## 14.0.0
16
+
17
+ - Rather than waiting an arbitrary time for channels to close when cancelling a subscription, Rascal now waits until any outstanding messages have been acknowledged. By default, Rascal will wait indefinitely, but this behaviour can be overriden by specifying a subscription.closeTimeout. If the timeout is exceeded following a direct call to `broker.unsubscribeAll` or `subscription.cancel` then an error will be yielded. If the timeout is exceeded following an indirect call to `subscription.cancel` (e.g. by `broker.shutdown`) then an error will be emitted but the operation will be allowed to continue.
18
+ - Messages which cannot be recovered by the republish or forward strategies are nacked resulting in message loss unless a dead letter is configured.
19
+
20
+ ## 13.1.4
21
+
22
+ - Fixed potential for returned messages cause the forward error strategy to yield twice
23
+ - Report returned messages from republish error strategy
24
+ - Tweak prettier rules
25
+
3
26
  ## 13.1.3
4
27
 
5
28
  - Fixed minor memory leak in recovery strategy loop