SQSClient

module:queue. SQSClient

Queue client using AWS SQS, full queue url can be used or just the name as sqs://queuename

Constructor

new SQSClient(options)

Source:
Parameters:
Name Type Description
options object
Properties
Name Type Attributes Description
count int <optional>

config property specifies how messages to process at the same time, default is 1.

interval int <optional>

config property defines in ms how often to check for new messages after processing a message, i.e. after a messages processed it can poll immediately or after this amount of time, default is 1000 milliseconds.

retryInterval int <optional>

config property defines in ms how often to check for new messages after an error or no data, i.e. on empty pool when no messages are processed it can poll immediately or after this amount of time, default is 5000 mulliseconds.

visibilityTimeout int <optional>

property specifies how long the messages being processed stay hidden, in milliseconds.

timeout int <optional>

property defines how long to wait for new messages, i.e. the long poll, in milliseconds

retryCount int <optional>

and retryTimeout define how many times to retry failed AWS HTTP requests, default is 5 times starting with the backoff starting at 500 milliseconds.

startTime int <optional>

property which is the time in the future when a message must be actually processed there, The scheduling is implemented using AWS visibilityTimeout feature, keep scheduled messages hidden until the actual time.

maxTimeout int <optional>

which defines in milliseconds the max time a messsage can stay invisible while waiting for its scheduled date, default is 6 hours, the AWS max is 12 hours.

Example
queue-messages=sqs://messages?bk-interval=60000
queue-messages=sqs://sqs.us-east-1.amazonaws.com/123456/messages?bk-visibilityTimeout=300&bk-count=2