module:queue
- Description:
Queue module for jobs, events and subscriptions.
All methods use
options.queueNamefor non-default queue.If it is an array then a client will be picked sequentially by maintaining internal sequence number.
To specify a channel within a queue use the format
queueName#channelName, for drivers that support multiple channels like NATS/Redis the channel will be used for another subscription within the same connection.For drivers (NATS) that support multiple consumers the full queue syntax is
queueName#channelName@groupNameorqueueName@groupName, as well as thegroupNameproperty in the subscribe options.Empty
defaultclient always exists, it can be overridden to make default some other driverTo enable stats collection for a queue it must be enabled with config:
queue-redis-options-metrics=1
Example
queue-default=redis://
queue-redis=redis://?bk-threshold=5&bk-visibilityTimeout=30000&bk-count=2
queue-account=https://sqs.us-east-1.amazonaws.com/566932855105/account?bk-count=2
queue-messages=sqs://messages?bk-interval=60000
queue-config={ "account": "https://sqs.us-east-1.amazonaws.com/566932855105/account?bk-count=2" }