Releases: dadi/queue
v2.2.3
v2.2.2
v2.2.1
Version 2.2.0
Version 2.1.1
Changed
#11: Removes conf.validate()
from the config loader so that custom values can be added to configuration files, and removes IP address validation from the queue.host
configuration variable so that hostnames can be used.
Version 2.1.0
Features
- unpack encapsulated base64 message data (706544e)
With queue-wrapper v1.1.0 and Queue v2.1.0 you can now send objects to a queue instead of just strings. Objects sent to the queue via queue-wrapper v1.1.0 send(address, object, callback)
method are serialized if applicable, and then base64 encoded. This version of Queue supports unpacking these messages, decoding them, and if application, turning them from serialized JSON back into objects.
Version 2.0.0
Queue Throttling
Queue Version 2.0.0 introduces the ability to control how many messages are processed in a defined timespan. This can be useful if a consumer (worker) uses external APIs which are rate limited, for example.
Queue throttling gives:
- the ability to set a default rate limit for the queue
- the ability to set message specific rate limits
This version introduces a breaking change, in that the previous configuration for throttling the number of concurrent workers has been abstracted from broker.throttle
to broker.throttle.workers
.
See the README for updated configuration documentation.
Here is an example:
"throttle": {
"workers": 5,
"queue": {
"unit": "second",
"value": 1
},
"messages": [
{
"name": "ten-per-second",
"regex": "^tps-.*$", // messages starting with "tps-"
"regexOpts": "i",
"unit": "second",
"value": 10
},
{
"name": "one-per-minute",
"regex": "^opm-.*$", // messages starting with "opm-"
"regexOpts": "i",
"unit": "minute",
"value": 1,
"discard": true
}
]
}