2 Home
gitea_admin edited this page 2026-03-11 14:35:55 +00:00

AWS Simple Queue Service (SQS)

Send and receive messages to/from AWS SQS.

Metadata

Property Value
Scheme aws2-sqs
Support Level Stable
Labels cloud,messaging
Version 4.10.2

Maven Dependency

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-aws2-sqs</artifactId>
    <version>4.10.2</version>
</dependency>

Endpoint Properties

Name Type Required Default Description
queueNameOrArn string Queue name or ARN
amazonAWSHost string amazonaws.com The hostname of the Amazon AWS cloud.
autoCreateQueue boolean false Setting the auto-creation of the queue
headerFilterStrategy object To use a custom HeaderFilterStrategy to map headers to/from Camel.
overrideEndpoint boolean false Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option
protocol string https The underlying protocol used to communicate with SQS
queueOwnerAWSAccountId string Specify the queue owner aws account id when you need to connect the queue with a different account owner.
region string The region in which SQS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()
uriEndpointOverride string Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
attributeNames string A list of attribute names to receive when consuming. Multiple names can be separated by comma.
concurrentConsumers integer 1 Allows you to use multiple threads to poll the sqs queue to increase throughput
concurrentRequestLimit integer 50 The maximum number of concurrent receive request send to AWS in single consumer polling.
defaultVisibilityTimeout integer The default visibility timeout (in seconds)
deleteAfterRead boolean true Delete message from SQS after it has been read
deleteIfFiltered boolean true Whether to send the DeleteMessage to the SQS queue if the exchange has property with key Sqs2Constants#SQS_DELETE_FILTERED (CamelAwsSqsDeleteFiltered) set to true.
extendMessageVisibility boolean false If enabled, then a scheduled background task will keep extending the message visibility on SQS. This is needed if it takes a long time to process the message. If set to true defaultVisibilityTimeout must be set. See details at Amazon docs.
kmsDataKeyReusePeriodSeconds integer The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes).
kmsMasterKeyId string The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.
maxMessagesPerPoll integer Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited, but use 0 or negative number to disable it as unlimited.
messageAttributeNames string A list of message attribute names to receive when consuming. Multiple names can be separated by comma.
sendEmptyMessageWhenIdle boolean false If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.
serverSideEncryptionEnabled boolean false Define if Server Side Encryption is enabled or not on the queue
sortAttributeName string The name of the message attribute used for sorting the messages. When specified, the messages polled by the consumer will be sorted by this attribute. This configuration may be of importance when you configure maxMessagesPerPoll parameter exceeding 10. In such cases, the messages will be fetched concurrently so the ordering is not guaranteed.
visibilityTimeout integer The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest. This only makes sense if it's different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute permanently.
waitTimeSeconds integer Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is in the queue to include in the response.
bridgeErrorHandler boolean false 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.
exceptionHandler object To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.
exchangePattern object Sets the exchange pattern when the consumer creates an exchange.
pollStrategy object A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.
batchSeparator string , Set the separator when passing a String to send batch message operation
delaySeconds integer Delay sending messages for a number of seconds.
messageDeduplicationIdStrategy string useExchangeId Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. It can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message.
messageGroupIdStrategy string Only for FIFO queues. Strategy for setting the messageGroupId on the message. It can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used.
messageHeaderExceededLimit string WARN What to do if sending to AWS SQS has more messages than AWS allows (currently only maximum 10 message headers are allowed). WARN will log a WARN about the limit is for each additional header, so the message can be sent to AWS. WARN_ONCE will only log one time a WARN about the limit is hit, and drop additional headers, so the message can be sent to AWS. IGNORE will ignore (no logging) and drop additional headers, so the message can be sent to AWS. FAIL will cause an exception to be thrown and the message is not sent to AWS.
operation object The operation to do in case the user don't want to send only a message
lazyStartProducer boolean false 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.
amazonSQSClient object To use the AmazonSQS client
delayQueue boolean false Define if you want to apply delaySeconds option to the queue or on single messages
proxyHost string To define a proxy host when instantiating the SQS client
proxyPort integer To define a proxy port when instantiating the SQS client
proxyProtocol object HTTPS To define a proxy protocol when instantiating the SQS client
maximumMessageSize integer The maximumMessageSize (in bytes) an SQS message can contain for this queue.
messageRetentionPeriod integer The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue.
policy string The policy for this queue. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems.
queueUrl string To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used to connect to a mock implementation of SQS, for testing purposes.
receiveMessageWaitTimeSeconds integer If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait.
redrivePolicy string Specify the policy that send message to DeadLetter queue. See detail at Amazon docs.
backoffErrorThreshold integer The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.
backoffIdleThreshold integer The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.
backoffMultiplier integer To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.
delay integer 500 Milliseconds before the next poll.
greedy boolean false If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.
initialDelay integer 1000 Milliseconds before the first poll starts.
repeatCount integer 0 Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever.
runLoggingLevel object TRACE The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.
scheduledExecutorService object Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.
scheduler object none To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler
schedulerProperties object To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler.
startScheduler boolean true Whether the scheduler should be auto started.
timeUnit object MILLISECONDS Time unit for initialDelay and delay options.
useFixedDelay boolean true Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.
accessKey string Amazon AWS Access Key
profileCredentialsName string If using a profile credentials provider, this parameter will set the profile name
secretKey string Amazon AWS Secret Key
sessionToken string Amazon AWS Session Token used when the user needs to assume an IAM role
trustAllCertificates boolean false If we want to trust all certificates in case of overriding the endpoint
useDefaultCredentialsProvider boolean false Set whether the SQS client should expect to load credentials on an AWS infra instance or to expect static credentials to be passed in.
useProfileCredentialsProvider boolean false Set whether the SQS client should expect to load credentials through a profile credentials provider.
useSessionCredentials boolean false Set whether the SQS client should expect to use Session Credentials. This is useful in a situation in which the user needs to assume an IAM role for doing operations in SQS.