Class Sqs2Configuration
java.lang.Object
org.apache.camel.component.aws2.sqs.Sqs2Configuration
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()software.amazon.awssdk.services.sqs.SqsClientintintsoftware.amazon.awssdk.core.ProtocolbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAccessKey(String accessKey) Amazon AWS Access KeyvoidsetAmazonAWSHost(String amazonAWSHost) The hostname of the Amazon AWS cloud.voidsetAmazonSQSClient(software.amazon.awssdk.services.sqs.SqsClient amazonSQSClient) To use the AmazonSQS clientvoidsetAttributeNames(String attributeNames) A list of attribute names to receive when consuming.voidsetAutoCreateQueue(boolean autoCreateQueue) Setting the auto-creation of the queuevoidsetBatchSeparator(String batchSeparator) Set the separator when passing a String to send batch message operationvoidsetConcurrentConsumers(int concurrentConsumers) Allows you to use multiple threads to poll the sqs queue to increase throughputvoidsetConcurrentRequestLimit(int concurrentRequestLimit) The maximum number of concurrent receive request send to AWS in single consumer polling.voidsetDefaultVisibilityTimeout(Integer defaultVisibilityTimeout) The default visibility timeout (in seconds)voidsetDelayQueue(boolean delayQueue) Define if you want to apply delaySeconds option to the queue or on single messagesvoidsetDelaySeconds(Integer delaySeconds) Delay sending messages for a number of seconds.voidsetDeleteAfterRead(boolean deleteAfterRead) Delete message from SQS after it has been readvoidsetDeleteIfFiltered(boolean deleteIfFiltered) Whether to send the DeleteMessage to the SQS queue if the exchange has property with keySqs2Constants.SQS_DELETE_FILTERED(CamelAwsSqsDeleteFiltered) set to true.voidsetExtendMessageVisibility(boolean extendMessageVisibility) If enabled, then a scheduled background task will keep extending the message visibility on SQS.voidsetKmsDataKeyReusePeriodSeconds(Integer kmsDataKeyReusePeriodSeconds) 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.voidsetKmsMasterKeyId(String kmsMasterKeyId) The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.voidsetMaximumMessageSize(Integer maximumMessageSize) The maximumMessageSize (in bytes) an SQS message can contain for this queue.voidsetMessageAttributeNames(String messageAttributeNames) A list of message attribute names to receive when consuming.voidsetMessageDeduplicationIdStrategy(String strategy) Only for FIFO queues.voidsetMessageDeduplicationIdStrategy(MessageDeduplicationIdStrategy messageDeduplicationIdStrategy) voidsetMessageGroupIdStrategy(String strategy) Only for FIFO queues.voidsetMessageGroupIdStrategy(MessageGroupIdStrategy messageGroupIdStrategy) voidsetMessageHeaderExceededLimit(String messageHeaderExceededLimit) What to do if sending to AWS SQS has more messages than AWS allows (currently only maximum 10 message headers are allowed).voidsetMessageRetentionPeriod(Integer messageRetentionPeriod) The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue.voidsetOperation(Sqs2Operations operation) The operation to do in case the user don't want to send only a messagevoidsetOverrideEndpoint(boolean overrideEndpoint) Set the need for overriding the endpoint.voidThe policy for this queue.voidsetProfileCredentialsName(String profileCredentialsName) If using a profile credentials provider, this parameter will set the profile namevoidsetProtocol(String protocol) The underlying protocol used to communicate with SQSvoidsetProxyHost(String proxyHost) To define a proxy host when instantiating the SQS clientvoidsetProxyPort(Integer proxyPort) To define a proxy port when instantiating the SQS clientvoidsetProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the SQS clientvoidsetQueueName(String queueName) Name of queue.voidsetQueueOwnerAWSAccountId(String queueOwnerAWSAccountId) Specify the queue owner aws account id when you need to connect the queue with a different account owner.voidsetQueueUrl(String queueUrl) To define the queueUrl explicitly.voidsetReceiveMessageWaitTimeSeconds(Integer receiveMessageWaitTimeSeconds) If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait.voidsetRedrivePolicy(String redrivePolicy) Specify the policy that send message to DeadLetter queue.voidThe region in which SQS client needs to work.voidsetSecretKey(String secretKey) Amazon AWS Secret KeyvoidsetServerSideEncryptionEnabled(boolean serverSideEncryptionEnabled) Define if Server Side Encryption is enabled or not on the queuevoidsetSessionToken(String sessionToken) Amazon AWS Session Token used when the user needs to assume an IAM rolevoidsetSortAttributeName(String sortAttributeName) The name of the message attribute used for sorting the messages.voidsetTrustAllCertificates(boolean trustAllCertificates) If we want to trust all certificates in case of overriding the endpointvoidsetUriEndpointOverride(String uriEndpointOverride) Set the overriding uri endpoint.voidsetUseDefaultCredentialsProvider(boolean useDefaultCredentialsProvider) Set whether the SQS client should expect to load credentials on an AWS infra instance or to expect static credentials to be passed in.voidsetUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) Set whether the SQS client should expect to load credentials through a profile credentials provider.voidsetUseSessionCredentials(boolean useSessionCredentials) Set whether the SQS client should expect to use Session Credentials.voidsetVisibilityTimeout(Integer visibilityTimeout) 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.voidsetWaitTimeSeconds(Integer waitTimeSeconds) 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.
-
Constructor Details
-
Sqs2Configuration
public Sqs2Configuration()
-
-
Method Details
-
getAmazonAWSHost
-
setAmazonAWSHost
The hostname of the Amazon AWS cloud. -
getQueueName
-
setQueueName
Name of queue. The queue will be created if they don't already exist. -
getAccessKey
-
setAccessKey
Amazon AWS Access Key -
getSecretKey
-
setSecretKey
Amazon AWS Secret Key -
getSessionToken
-
setSessionToken
Amazon AWS Session Token used when the user needs to assume an IAM role -
isDeleteAfterRead
public boolean isDeleteAfterRead() -
setDeleteAfterRead
public void setDeleteAfterRead(boolean deleteAfterRead) Delete message from SQS after it has been read -
getAmazonSQSClient
public software.amazon.awssdk.services.sqs.SqsClient getAmazonSQSClient() -
setAmazonSQSClient
public void setAmazonSQSClient(software.amazon.awssdk.services.sqs.SqsClient amazonSQSClient) To use the AmazonSQS client -
getVisibilityTimeout
-
setVisibilityTimeout
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. -
getAttributeNames
-
setAttributeNames
A list of attribute names to receive when consuming. Multiple names can be separated by comma. -
getMessageAttributeNames
-
setMessageAttributeNames
A list of message attribute names to receive when consuming. Multiple names can be separated by comma. -
getDefaultVisibilityTimeout
-
setDefaultVisibilityTimeout
The default visibility timeout (in seconds) -
getDelaySeconds
-
setDelaySeconds
Delay sending messages for a number of seconds. -
isDelayQueue
public boolean isDelayQueue() -
setDelayQueue
public void setDelayQueue(boolean delayQueue) Define if you want to apply delaySeconds option to the queue or on single messages -
getMaximumMessageSize
-
setMaximumMessageSize
The maximumMessageSize (in bytes) an SQS message can contain for this queue. -
getMessageRetentionPeriod
-
setMessageRetentionPeriod
The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue. -
getPolicy
-
setPolicy
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. -
getRedrivePolicy
-
setRedrivePolicy
Specify the policy that send message to DeadLetter queue. See detail at Amazon docs. -
isExtendMessageVisibility
public boolean isExtendMessageVisibility() -
setExtendMessageVisibility
public void setExtendMessageVisibility(boolean extendMessageVisibility) 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. -
getReceiveMessageWaitTimeSeconds
-
setReceiveMessageWaitTimeSeconds
If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait. -
getWaitTimeSeconds
-
setWaitTimeSeconds
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. -
getQueueOwnerAWSAccountId
-
setQueueOwnerAWSAccountId
Specify the queue owner aws account id when you need to connect the queue with a different account owner. -
isDeleteIfFiltered
public boolean isDeleteIfFiltered() -
setDeleteIfFiltered
public void setDeleteIfFiltered(boolean deleteIfFiltered) Whether to send the DeleteMessage to the SQS queue if the exchange has property with keySqs2Constants.SQS_DELETE_FILTERED(CamelAwsSqsDeleteFiltered) set to true. -
getRegion
-
setRegion
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() -
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
public void setConcurrentConsumers(int concurrentConsumers) Allows you to use multiple threads to poll the sqs queue to increase throughput -
getConcurrentRequestLimit
public int getConcurrentRequestLimit() -
setConcurrentRequestLimit
public void setConcurrentRequestLimit(int concurrentRequestLimit) The maximum number of concurrent receive request send to AWS in single consumer polling. -
getSortAttributeName
-
setSortAttributeName
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. -
getQueueUrl
-
setQueueUrl
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. -
getProxyProtocol
public software.amazon.awssdk.core.Protocol getProxyProtocol() -
setProxyProtocol
public void setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the SQS client -
getProxyHost
-
setProxyHost
To define a proxy host when instantiating the SQS client -
getProxyPort
-
setProxyPort
To define a proxy port when instantiating the SQS client -
getKmsMasterKeyId
-
setKmsMasterKeyId
The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. -
getKmsDataKeyReusePeriodSeconds
-
setKmsDataKeyReusePeriodSeconds
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). -
isServerSideEncryptionEnabled
public boolean isServerSideEncryptionEnabled() -
setServerSideEncryptionEnabled
public void setServerSideEncryptionEnabled(boolean serverSideEncryptionEnabled) Define if Server Side Encryption is enabled or not on the queue -
setMessageGroupIdStrategy
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. -
setMessageGroupIdStrategy
-
getMessageGroupIdStrategy
-
getMessageDeduplicationIdStrategy
-
setMessageDeduplicationIdStrategy
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. -
setMessageDeduplicationIdStrategy
public void setMessageDeduplicationIdStrategy(MessageDeduplicationIdStrategy messageDeduplicationIdStrategy) -
getOperation
-
setOperation
The operation to do in case the user don't want to send only a message -
isAutoCreateQueue
public boolean isAutoCreateQueue() -
setAutoCreateQueue
public void setAutoCreateQueue(boolean autoCreateQueue) Setting the auto-creation of the queue -
getProtocol
-
setProtocol
The underlying protocol used to communicate with SQS -
isTrustAllCertificates
public boolean isTrustAllCertificates() -
setTrustAllCertificates
public void setTrustAllCertificates(boolean trustAllCertificates) If we want to trust all certificates in case of overriding the endpoint -
isUseDefaultCredentialsProvider
public boolean isUseDefaultCredentialsProvider() -
setUseDefaultCredentialsProvider
public void setUseDefaultCredentialsProvider(boolean useDefaultCredentialsProvider) Set whether the SQS client should expect to load credentials on an AWS infra instance or to expect static credentials to be passed in. -
setUseProfileCredentialsProvider
public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) Set whether the SQS client should expect to load credentials through a profile credentials provider. -
isUseProfileCredentialsProvider
public boolean isUseProfileCredentialsProvider() -
isUseSessionCredentials
public boolean isUseSessionCredentials() -
setUseSessionCredentials
public void setUseSessionCredentials(boolean useSessionCredentials) 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. -
getBatchSeparator
-
setBatchSeparator
Set the separator when passing a String to send batch message operation -
getMessageHeaderExceededLimit
-
setMessageHeaderExceededLimit
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. -
isOverrideEndpoint
public boolean isOverrideEndpoint() -
setOverrideEndpoint
public void setOverrideEndpoint(boolean overrideEndpoint) Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option -
getUriEndpointOverride
-
setUriEndpointOverride
Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option -
getProfileCredentialsName
-
setProfileCredentialsName
If using a profile credentials provider, this parameter will set the profile name -
copy
-