AWS Simple Queue Service (SQS)
Send messages to and receive messages from a queue of Amazon Simple Queue Service (SQS).
What’s inside
-
AWS Simple Queue Service (SQS) component, URI syntax:
aws2-sqs:queueNameOrArn
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-aws2-sqs-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 53 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.aws2-sqs.access-key | The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless amazonSQSClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-sqs.amazon-a-w-s-host | The domain of Amazon SQS, to which the endpoint adds sqs and the region, as in sqs.eu-west-1.amazonaws.com, to build the queue URL when the region and queueOwnerAWSAccountId options are set. Any other value is a complete host name, for example of an SQS compatible server: the client then sends its requests to it, with the protocol of the protocol option, unless overrideEndpoint is true, and the queue URL is built with it. | amazonaws.com | String |
camel.component.aws2-sqs.amazon-s-q-s-client | To use a custom software.amazon.awssdk.services.sqs.SqsClient, which is autowired when the registry has a single one. When this option is set, the credentials, region, proxy, endpoint override, amazonAWSHost and trustAllCertificates options are not used to create a client. The endpoint does not close a client that is set or autowired. The option is a software.amazon.awssdk.services.sqs.SqsClient type. | SqsClient | |
camel.component.aws2-sqs.attribute-names | The comma separated names of the message system attributes that each receive request asks for, as Amazon SQS spells them, such as SentTimestamp, ApproximateReceiveCount, MessageGroupId or All. The consumer logs and skips an unknown name. Each received attribute is set as a header of its own name and in the CamelAwsSqsAttributes header. | String | |
camel.component.aws2-sqs.auto-create-queue | Whether the endpoint creates the queue when it starts and finds no queue with this name, with the queue attributes of the options of the queue group; a name that ends with .fifo creates a FIFO queue. The consumer also creates it when a receive request finds that it does not exist, and tries again 30 seconds later if it was deleted recently. The endpoint does not look for the queue at start when queueUrl is set, or when region and queueOwnerAWSAccountId are set, so it does not create it then. | false | Boolean |
camel.component.aws2-sqs.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.aws2-sqs.batch-separator | The separator that splits a String body into the messages of the sendBatchMessage operation. It is a plain string, not a regular expression. | , | String |
camel.component.aws2-sqs.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.aws2-sqs.concurrent-consumers | The number of threads that poll the queue at the same time, each one with its own receive requests, to increase the throughput. It applies only to the default scheduler of the consumer. | 1 | Integer |
camel.component.aws2-sqs.concurrent-request-limit | The maximum number of receive requests that the consumer runs at the same time, when maxMessagesPerPoll is above 10 and a poll is split into requests of at most 10 messages. The other requests of the poll wait for one of them to finish. A value below 1 is used as 1. | 50 | Integer |
camel.component.aws2-sqs.configuration | The configuration that the endpoints of this component start from. Each endpoint gets a copy of it, and the options of the endpoint replace its values. The option is a org.apache.camel.component.aws2.sqs.Sqs2Configuration type. | Sqs2Configuration | |
camel.component.aws2-sqs.default-visibility-timeout | The VisibilityTimeout attribute of the queue in seconds, 0 to 43,200 (12 hours), which applies to every receive request that does not set its own, see visibilityTimeout. The endpoint sets it when it starts, on a queue it creates and on an existing queue, also for a producer. | Integer | |
camel.component.aws2-sqs.delay-queue | Whether the delaySeconds option sets the DelaySeconds attribute of the queue when the endpoint starts, which delays every message of the queue, instead of the delay of each sent message. The CamelAwsSqsDelaySeconds header is not used then. | false | Boolean |
camel.component.aws2-sqs.delay-seconds | The delay in seconds, 0 to 900, before a sent message becomes visible to consumers. The producer sets it as the DelaySeconds of each message, and the CamelAwsSqsDelaySeconds header replaces it; it is not set for a FIFO queue, which supports only a delay of the queue. When delayQueue is true, the endpoint sets it as the DelaySeconds attribute of the queue instead. | Integer | |
camel.component.aws2-sqs.delete-after-read | Whether the consumer deletes the message from the queue when its exchange completes successfully. A message whose exchange fails is not deleted, and Amazon SQS delivers it again when its visibility timeout runs out. When false, see deleteIfFiltered. | true | Boolean |
camel.component.aws2-sqs.delete-if-filtered | Whether the consumer deletes the message when its exchange completes successfully with the exchange property CamelAwsSqsDeleteFiltered set to true, for example by a Filter EIP that lets the message through. It applies only when deleteAfterRead is false, as the consumer otherwise deletes every message that completes successfully. | true | Boolean |
camel.component.aws2-sqs.enabled | Whether to enable auto configuration of the aws2-sqs component. This is enabled by default. | Boolean | |
camel.component.aws2-sqs.extend-message-visibility | Whether a background task keeps the messages of a poll hidden until their exchange completes or fails, for a route that takes longer than the visibility timeout. Every half of visibilityTimeout, in whole seconds, the task calls ChangeMessageVisibilityBatch for the messages that have used 80% of their visibility timeout, and sets it to visibilityTimeout again. It requires a visibilityTimeout of at least 2 seconds; 10 seconds or more is recommended. | false | Boolean |
camel.component.aws2-sqs.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.aws2-sqs.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.aws2-sqs.kms-data-key-reuse-period-seconds | How long in seconds, 60 to 86,400 (24 hours), Amazon SQS reuses a data key to encrypt or decrypt messages before it calls AWS KMS again; Amazon SQS uses 300 when it is not set. The endpoint sets it as the KmsDataKeyReusePeriodSeconds attribute of the queue when it starts, also on an existing queue, and only when serverSideEncryptionEnabled is true. | Integer | |
camel.component.aws2-sqs.kms-master-key-id | The ID, alias or ARN of the AWS KMS key that encrypts the messages of the queue, for example alias/aws/sqs for the AWS managed key of Amazon SQS. The endpoint sets it as the KmsMasterKeyId attribute of the queue when it starts, also on an existing queue, and only when serverSideEncryptionEnabled is true. | String | |
camel.component.aws2-sqs.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.aws2-sqs.maximum-message-size | The MaximumMessageSize attribute of the queue: how many bytes, 1,024 to 1,048,576 (1 MiB), a message can contain before Amazon SQS rejects it. The endpoint sets it when it starts, on a queue it creates and on an existing queue. | Integer | |
camel.component.aws2-sqs.message-attribute-names | The comma separated names of the message attributes that each receive request asks for; All or .* asks for all of them, and a name that ends with .* for those with that prefix. Amazon SQS returns no message attributes when this option is not set. Each received message attribute is set as a header of its own name, unless the headerFilterStrategy filters it, and in the CamelAwsSqsMessageAttributes header. | String | |
camel.component.aws2-sqs.message-deduplication-id-strategy | How the producer sets the MessageDeduplicationId of a message to a FIFO queue: useExchangeId uses the ID of the exchange, followed by - and the position of the message for sendBatchMessage, and useContentBasedDeduplication sets none, so that Amazon SQS deduplicates by a hash of the body, which the queue must enable. A FIFO queue that the endpoint creates with useContentBasedDeduplication has content-based deduplication enabled. It is not used for a standard queue. | useExchangeId | String |
camel.component.aws2-sqs.message-group-id-strategy | How the producer sets the MessageGroupId of a message to a FIFO queue: useConstant puts all messages in the group CamelSingleMessageGroup, useExchangeId uses the ID of the exchange, so each message is a group of its own, and usePropertyValue uses the exchange property CamelAwsMessageGroupId. A FIFO queue requires it: without it the producer fails. It is not used for a standard queue. | String | |
camel.component.aws2-sqs.message-header-exceeded-limit | What the producer does when the message has more headers to send as message attributes than the 10 that Amazon SQS accepts: WARN logs a warning for each extra header and drops it, WARN_ONCE logs one warning and drops the extra headers, IGNORE drops them without a warning, and FAIL fails the exchange without sending the message. Only the headers that the headerFilterStrategy does not filter count. | WARN | String |
camel.component.aws2-sqs.message-retention-period | The MessageRetentionPeriod attribute of the queue: how long in seconds, 60 to 1,209,600 (14 days), Amazon SQS keeps a message; 345,600 (4 days) by default. The endpoint sets it when it starts, on a queue it creates and on an existing queue. | Integer | |
camel.component.aws2-sqs.operation | The operation of the producer. If not set, the producer sends the body as one message. The CamelAwsSqsOperation header replaces this option. | Sqs2Operations | |
camel.component.aws2-sqs.override-endpoint | Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set. | false | Boolean |
camel.component.aws2-sqs.policy | The access policy of the queue, a JSON document that the endpoint sets as the Policy attribute of the queue when it starts, on a queue it creates and on an existing queue. It is loaded from the classpath by default; use the prefix file: or http: to load it from another location. | String | |
camel.component.aws2-sqs.profile-credentials-name | The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change. | String | |
camel.component.aws2-sqs.protocol | The protocol, http or https, of the URLs that the endpoint builds from the amazonAWSHost option: the queue URL when region and queueOwnerAWSAccountId are set, and the endpoint of the client when amazonAWSHost is not amazonaws.com and overrideEndpoint is false. | https | String |
camel.component.aws2-sqs.proxy-host | The host name of the proxy that the HTTP client of Amazon SQS connects through. The proxy is used only when the proxyPort option is set too. | String | |
camel.component.aws2-sqs.proxy-port | The port of the proxy that the HTTP client of Amazon SQS connects through. The proxy is used only when the proxyHost option is set too. | Integer | |
camel.component.aws2-sqs.proxy-protocol | The protocol that the HTTP client of Amazon SQS uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set. | https | Protocol |
camel.component.aws2-sqs.queue-owner-a-w-s-account-id | The ID of the AWS account that owns the queue, to use a queue of another account. When the region option is set too, the endpoint builds the queue URL from both without calling Amazon SQS; otherwise it looks the URL up with GetQueueUrl for this account. A queue ARN in the path sets this option. | String | |
camel.component.aws2-sqs.queue-url | The URL of the queue, to use instead of the URL that the endpoint looks up or builds from the queue name, region, queueOwnerAWSAccountId and amazonAWSHost options, for example for an SQS compatible server. The endpoint then does not look for the queue or create it when it starts. | String | |
camel.component.aws2-sqs.receive-message-wait-time-seconds | The ReceiveMessageWaitTimeSeconds attribute of the queue: how long in seconds, 0 to 20, a receive request that does not set its own wait time waits for a message, see waitTimeSeconds. The endpoint sets it when it starts, on a queue it creates and on an existing queue. | Integer | |
camel.component.aws2-sqs.redrive-policy | The RedrivePolicy attribute of the queue, a JSON object with the deadLetterTargetArn of the dead-letter queue and the maxReceiveCount after which Amazon SQS moves a message to it, for example \{deadLetterTargetArn:arn:aws:sqs:us-east-1:123456789012:dlq,maxReceiveCount:5}. The endpoint sets it when it starts, on a queue it creates and on an existing queue. | String | |
camel.component.aws2-sqs.region | The AWS region of Amazon SQS, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). If not set, the default region provider chain of the AWS SDK is used. When the queue is given as an ARN, its region replaces the region of the component, and this option on the endpoint replaces both. | String | |
camel.component.aws2-sqs.secret-key | The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless amazonSQSClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-sqs.server-side-encryption-enabled | Whether the endpoint sets the kmsMasterKeyId and kmsDataKeyReusePeriodSeconds options as attributes of the queue when it starts, on a queue it creates and on an existing queue, to encrypt the queue with AWS KMS. False does not turn off the encryption of an existing queue. | false | Boolean |
camel.component.aws2-sqs.session-token | The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. All three are then required: if one of the three is missing, creating the client fails. | String | |
camel.component.aws2-sqs.sort-attribute-name | The name of a message system attribute, such as SentTimestamp, by which the consumer sorts the messages of a poll, comparing the values as text. It applies only when maxMessagesPerPoll is above 10, as the receive requests of a poll then run at the same time and return the messages in no particular order. The consumer asks for the attribute in each receive request. All and unknown names are logged and not used. | String | |
camel.component.aws2-sqs.trust-all-certificates | Whether the HTTP client of Amazon SQS trusts every TLS certificate without checking it. It applies to any endpoint, not only to an overridden one, so use it only for testing, for example against a local emulator. | false | Boolean |
camel.component.aws2-sqs.uri-endpoint-override | The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true. | String | |
camel.component.aws2-sqs.use-default-credentials-provider | Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options. | false | Boolean |
camel.component.aws2-sqs.use-profile-credentials-provider | Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials. | false | Boolean |
camel.component.aws2-sqs.use-session-credentials | Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true. | false | Boolean |
camel.component.aws2-sqs.visibility-timeout | The visibility timeout in seconds, 0 to 43,200 (12 hours), that each receive request sets on the messages it returns, so that they are hidden from other receive requests. If not set, the VisibilityTimeout attribute of the queue applies, see defaultVisibilityTimeout. It is required by extendMessageVisibility, which extends the visibility of a message by this duration. | Integer | |
camel.component.aws2-sqs.wait-time-seconds | The WaitTimeSeconds of each receive request: how long in seconds, 0 to 20, the request waits for a message to arrive when the queue is empty (long polling). If not set, the ReceiveMessageWaitTimeSeconds attribute of the queue applies, which is 0 by default. | Integer |