queue

module:queue

Description:
  • Queue module for jobs, events and subscriptions.

    All methods use options.queueName for 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@groupName or queueName@groupName, as well as the groupName property in the subscribe options.

    Empty default client always exists, it can be overridden to make default some other driver

    To 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" }

Classes

EventBridgeClient
JSONClient
LocalClient
NatsClient
QueueClient
RedisClient
SNSClient
SQSClient
WorkerClient