AWS SNS/SQS
Type: pubsub.aws.snssqs
Status: stable
Reference: https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-aws-snssqs/
Example
apiVersion: cra.diagrid.io/v1beta1
kind: Component
metadata:
name: <name>
spec:
type: pubsub.aws.snssqs
version: v1
metadata:
# AWS access key associated with an IAM account
- name: accessKey
value: "AKIAIOSFODNN7EXAMPLE"
# The AWS Region where the AWS resource is deployed to.
- name: awsRegion
value: "us-east-1"
# The secret key associated with the access key
- name: secretKey
value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
# AWS session token to use. A session token is only required if you are using temporary security credentials. (Optional)
#- name: sessionToken
# value: "TOKEN"
# The AWS account ID. Resolved automatically if not provided. (Optional)
#- name: accountId
# value: ""
# Amount of time in seconds, for an AWS asset management operation, before it times out and cancelled. Asset management operations are any operations performed on STS, SNS and SQS, except message publish and consume operations that implement the default Dapr component retry behavior. The value can be set to any non-negative float/integer. (Optional)
#- name: assetsManagementTimeoutSeconds
# value: "1"
# When messages are received in bulk from SQS, call the subscriber sequentially (“single” message at a time), or concurrently (in “parallel”). (Optional)
#- name: concurrencyMode
# value: "parallel"
# Set the consumer ID to control namespacing. Defaults to the app's ID. (Optional)
#- name: consumerID
# value: "{namespace}"
# When set to true, after retrying and failing of messageRetryLimit times processing a message, reset the message visibility timeout so that other consumers can try processing, instead of deleting the message from SQS (the default behvior). (Optional)
#- name: disableDeleteOnRetryLimit
# value: "false"
# When set to true, SNS topics, SQS queues and the SQS subscriptions to SNS do not get created automatically. (Optional)
#- name: disableEntityManagement
# value: "false"
# Use SQS FIFO queue to provide message ordering and deduplication. See `Amazon SQS FIFO (First-In-First-Out) queues` further details. (Optional)
#- name: fifo
# value: "false"
# If fifo is enabled, instructs Dapr to use a custom Message Group ID for the pubsub deployment. This is not mandatory as Dapr creates a custom Message Group ID for each producer, thus ensuring ordering of messages per a Dapr producer. See Message Group ID Property documentation. (Optional)
#- name: fifoMessageGroupID
# value: "app1-mgi"
# Maximum number of messages to receive from the queue at a time. (Optional)
#- name: messageMaxNumber
# value: "10"
# Threshold for the number of times a message can be received and processed before it is either removed from the queue or moved to the SQS dead-letters queue when processing fails. (Optional)
#- name: messageReceiveLimit
# value: "10"
# Number of times to resend a message after processing of that message fails before removing that message from the queue. (Optional)
#- name: messageRetryLimit
# value: "10"
# Amount of time in seconds that a message is hidden from receive requests after it is sent to a subscriber. (Optional)
#- name: messageVisibilityTimeout
# value: "10"
# The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than messageWaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages. (Optional)
#- name: messageWaitTimeSeconds
# value: "1"
# Name of the dead letters queue for this application. (Optional)
#- name: sqsDeadLettersQueueName
# value: "myapp-dlq"
Authentication profiles
Available authentication profiles:
- AWS: Access Key ID and Secret Access Key
AWS: Access Key ID and Secret Access Key
Authenticate using an Access Key ID and Secret Access Key included in the metadata
accessKey
Required - AWS access key associated with an IAM account
Example value: AKIAIOSFODNN7EXAMPLE
awsRegion
(string)
Required - The AWS Region where the AWS resource is deployed to.
Example value: us-east-1
secretKey
Required - The secret key associated with the access key
Example value: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
sessionToken
(string)
AWS session token to use. A session token is only required if you are using temporary security credentials.
Example value: TOKEN
Metadata
accountId
(string)
The AWS account ID. Resolved automatically if not provided.
assetsManagementTimeoutSeconds
(number)
Amount of time in seconds, for an AWS asset management operation, before it times out and cancelled. Asset management operations are any operations performed on STS, SNS and SQS, except message publish and consume operations that implement the default Dapr component retry behavior. The value can be set to any non-negative float/integer.
Default value: 1
Example value: 0.5, 10
concurrencyMode
(string)
When messages are received in bulk from SQS, call the subscriber sequentially (“single” message at a time), or concurrently (in “parallel”).
Default value: parallel
Example value: single, parallel
consumerID
(string)
Set the consumer ID to control namespacing. Defaults to the app's ID.
Example value: {namespace}
Documentation: https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/#consumer-groups-and-competing-consumers-pattern
disableDeleteOnRetryLimit
(bool)
When set to true, after retrying and failing of messageRetryLimit times processing a message, reset the message visibility timeout so that other consumers can try processing, instead of deleting the message from SQS (the default behvior).
Default value: false
Example value: true, false
disableEntityManagement
(bool)
When set to true, SNS topics, SQS queues and the SQS subscriptions to SNS do not get created automatically.
Default value: false
Example value: true, false
fifo
(bool)
Use SQS FIFO queue to provide message ordering and deduplication. See Amazon SQS FIFO (First-In-First-Out) queues
further details.
Default value: false
Example value: true, false
Amazon SQS FIFO (First-In-First-Out) queues: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
fifoMessageGroupID
(string)
If fifo is enabled, instructs Dapr to use a custom Message Group ID for the pubsub deployment. This is not mandatory as Dapr creates a custom Message Group ID for each producer, thus ensuring ordering of messages per a Dapr producer. See Message Group ID Property documentation.
Example value: app1-mgi
Message Group ID Property documentation: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html
messageMaxNumber
(number)
Maximum number of messages to receive from the queue at a time.
Default value: 10
Example value: 10
messageReceiveLimit
(number)
Threshold for the number of times a message can be received and processed before it is either removed from the queue or moved to the SQS dead-letters queue when processing fails.
Default value: 10
Example value: 10
messageRetryLimit
(number)
Number of times to resend a message after processing of that message fails before removing that message from the queue.
Default value: 10
Example value: 10
messageVisibilityTimeout
(number)
Amount of time in seconds that a message is hidden from receive requests after it is sent to a subscriber.
Default value: 10
Example value: 10
messageWaitTimeSeconds
(number)
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than messageWaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.
Default value: 1
Example value: 1
sqsDeadLettersQueueName
(string)
Name of the dead letters queue for this application.
Example value: myapp-dlq