The SQS queue URL.
Optional
alwaysBy default, the consumer will treat an empty object or array from either of the
handlers as a acknowledgement of no messages and will not delete those messages as
a result. Set this to true
to always acknowledge all messages no matter the returned
value.
Optional
attributeList of queue attributes to retrieve, see AWS docs.
Optional
authenticationThe duration (in milliseconds) to wait before retrying after an authentication error.
Optional
batchThe number of messages to request from SQS when polling (default 1
).
This cannot be higher than the AWS limit of 10.
Optional
extendedAWSErrorsSet this to true
if you want to receive additional information about the error
that occurred from AWS, such as the response and metadata.
Optional
handleTime in ms to wait for handleMessage
to process a message before timing out.
Emits timeout_error
on timeout. By default, if handleMessage
times out,
the unprocessed message returns to the end of the queue.
Optional
heartbeatThe interval (in seconds) between requests to extend the message visibility timeout.
On each heartbeat the visibility is extended by adding visibilityTimeout
to
the number of seconds since the start of the handler function.
This value must less than visibilityTimeout
.
Optional
messageList of message attributes to retrieve (i.e. ['name', 'address']
).
Optional
messageA list of attributes that need to be returned along with each message.
Optional
pollingIf you want the stop action to wait for the final poll to complete and in-flight messages to be processed before emitting 'stopped' set this to the max amount of time to wait.
Optional
pollingThe duration (in milliseconds) to wait before repolling the queue.
Optional
regionThe AWS region.
Optional
shouldDefault to true
, if you don't want the package to delete messages from sqs
set this to false
.
Optional
sqsAn optional SQS Client object to use if you need to configure the client manually.
Optional
terminateIf true, sets the message visibility timeout to 0 after a processing_error
. You can
also specify a different timeout using a number.
Optional
useSet this value to false to ignore the queueUrl
and use the
client's resolved endpoint, which may be a custom endpoint.
Optional
visibilityThe duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
Optional
waitThe duration (in seconds) for which the call will wait for a message to arrive in the queue before returning.
Optional
handleAn async
function (or function that returns a Promise
) to be called whenever
a message is received.
In the case that you need to acknowledge the message, return an object containing the MessageId that you'd like to acknowledge.
Optional
handleAn async
function (or function that returns a Promise
) to be called whenever
a batch of messages is received. Similar to handleMessage
but will receive the
list of messages, not each message individually.
If both are set, handleMessageBatch
overrides handleMessage
.
In the case that you need to ack only some of the messages, return an array with the successful messages only.
Optional
postOptional
pre
The options for the consumer.