Class Sqs2Configuration
- java.lang.Object
-
- org.apache.camel.component.aws2.sqs.Sqs2Configuration
-
-
Constructor Summary
Constructors Constructor Description Sqs2Configuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sqs2Configuration
copy()
String
getAccessKey()
String
getAmazonAWSHost()
software.amazon.awssdk.services.sqs.SqsClient
getAmazonSQSClient()
String
getAttributeNames()
String
getBatchSeparator()
int
getConcurrentConsumers()
Integer
getDefaultVisibilityTimeout()
Integer
getDelaySeconds()
Integer
getKmsDataKeyReusePeriodSeconds()
String
getKmsMasterKeyId()
Integer
getMaximumMessageSize()
String
getMessageAttributeNames()
MessageDeduplicationIdStrategy
getMessageDeduplicationIdStrategy()
MessageGroupIdStrategy
getMessageGroupIdStrategy()
String
getMessageHeaderExceededLimit()
Integer
getMessageRetentionPeriod()
Sqs2Operations
getOperation()
String
getPolicy()
String
getProtocol()
String
getProxyHost()
Integer
getProxyPort()
software.amazon.awssdk.core.Protocol
getProxyProtocol()
String
getQueueName()
String
getQueueOwnerAWSAccountId()
String
getQueueUrl()
Integer
getReceiveMessageWaitTimeSeconds()
String
getRedrivePolicy()
String
getRegion()
String
getSecretKey()
String
getUriEndpointOverride()
Integer
getVisibilityTimeout()
Integer
getWaitTimeSeconds()
boolean
isAutoCreateQueue()
boolean
isDelayQueue()
boolean
isDeleteAfterRead()
boolean
isDeleteIfFiltered()
boolean
isExtendMessageVisibility()
boolean
isOverrideEndpoint()
boolean
isServerSideEncryptionEnabled()
boolean
isTrustAllCertificates()
boolean
isUseDefaultCredentialsProvider()
void
setAccessKey(String accessKey)
Amazon AWS Access Keyvoid
setAmazonAWSHost(String amazonAWSHost)
The hostname of the Amazon AWS cloud.void
setAmazonSQSClient(software.amazon.awssdk.services.sqs.SqsClient amazonSQSClient)
To use the AmazonSQS as clientvoid
setAttributeNames(String attributeNames)
A list of attribute names to receive when consuming.void
setAutoCreateQueue(boolean autoCreateQueue)
Setting the autocreation of the queuevoid
setBatchSeparator(String batchSeparator)
Set the separator when passing a String to send batch message operationvoid
setConcurrentConsumers(int concurrentConsumers)
Allows you to use multiple threads to poll the sqs queue to increase throughputvoid
setDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
The default visibility timeout (in seconds)void
setDelayQueue(boolean delayQueue)
Define if you want to apply delaySeconds option to the queue or on single messagesvoid
setDelaySeconds(Integer delaySeconds)
Delay sending messages for a number of seconds.void
setDeleteAfterRead(boolean deleteAfterRead)
Delete message from SQS after it has been readvoid
setDeleteIfFiltered(boolean deleteIfFiltered)
Whether or not to send the DeleteMessage to the SQS queue if the exchange has property with keySqs2Constants.SQS_DELETE_FILTERED
(CamelAwsSqsDeleteFiltered) set to true.void
setExtendMessageVisibility(boolean extendMessageVisibility)
If enabled then a scheduled background task will keep extending the message visibility on SQS.void
setKmsDataKeyReusePeriodSeconds(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.void
setKmsMasterKeyId(String kmsMasterKeyId)
The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.void
setMaximumMessageSize(Integer maximumMessageSize)
The maximumMessageSize (in bytes) an SQS message can contain for this queue.void
setMessageAttributeNames(String messageAttributeNames)
A list of message attribute names to receive when consuming.void
setMessageDeduplicationIdStrategy(String strategy)
Only for FIFO queues.void
setMessageDeduplicationIdStrategy(MessageDeduplicationIdStrategy messageDeduplicationIdStrategy)
void
setMessageGroupIdStrategy(String strategy)
Only for FIFO queues.void
setMessageGroupIdStrategy(MessageGroupIdStrategy messageGroupIdStrategy)
void
setMessageHeaderExceededLimit(String messageHeaderExceededLimit)
What to do if sending to AWS SQS has more messages than AWS allows (currently only maximum 10 message headers is allowed).void
setMessageRetentionPeriod(Integer messageRetentionPeriod)
The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue.void
setOperation(Sqs2Operations operation)
The operation to do in case the user don't want to send only a messagevoid
setOverrideEndpoint(boolean overrideEndpoint)
Set the need for overriding the endpoint.void
setPolicy(String policy)
The policy for this queue.void
setProtocol(String protocol)
The underlying protocol used to communicate with SQSvoid
setProxyHost(String proxyHost)
To define a proxy host when instantiating the SQS clientvoid
setProxyPort(Integer proxyPort)
To define a proxy port when instantiating the SQS clientvoid
setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol)
To define a proxy protocol when instantiating the SQS clientvoid
setQueueName(String queueName)
Name of queue.void
setQueueOwnerAWSAccountId(String queueOwnerAWSAccountId)
Specify the queue owner aws account id when you need to connect the queue with different account owner.void
setQueueUrl(String queueUrl)
To define the queueUrl explicitly.void
setReceiveMessageWaitTimeSeconds(Integer receiveMessageWaitTimeSeconds)
If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait.void
setRedrivePolicy(String redrivePolicy)
Specify the policy that send message to DeadLetter queue.void
setRegion(String region)
The region in which SQS client needs to work.void
setSecretKey(String secretKey)
Amazon AWS Secret Keyvoid
setServerSideEncryptionEnabled(boolean serverSideEncryptionEnabled)
Define if Server Side Encryption is enabled or not on the queuevoid
setTrustAllCertificates(boolean trustAllCertificates)
If we want to trust all certificates in case of overriding the endpointvoid
setUriEndpointOverride(String uriEndpointOverride)
Set the overriding uri endpoint.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.void
setVisibilityTimeout(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.void
setWaitTimeSeconds(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.
-
-
-
Method Detail
-
getAmazonAWSHost
public String getAmazonAWSHost()
-
setAmazonAWSHost
public void setAmazonAWSHost(String amazonAWSHost)
The hostname of the Amazon AWS cloud.
-
getQueueName
public String getQueueName()
-
setQueueName
public void setQueueName(String queueName)
Name of queue. The queue will be created if they don't already exists.
-
getAccessKey
public String getAccessKey()
-
setAccessKey
public void setAccessKey(String accessKey)
Amazon AWS Access Key
-
getSecretKey
public String getSecretKey()
-
setSecretKey
public void setSecretKey(String secretKey)
Amazon AWS Secret Key
-
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 as client
-
getVisibilityTimeout
public Integer getVisibilityTimeout()
-
setVisibilityTimeout
public void setVisibilityTimeout(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. This only make sense if its different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute permanently.
-
getAttributeNames
public String getAttributeNames()
-
setAttributeNames
public void setAttributeNames(String attributeNames)
A list of attribute names to receive when consuming. Multiple names can be separated by comma.
-
getMessageAttributeNames
public String getMessageAttributeNames()
-
setMessageAttributeNames
public void setMessageAttributeNames(String messageAttributeNames)
A list of message attribute names to receive when consuming. Multiple names can be separated by comma.
-
getDefaultVisibilityTimeout
public Integer getDefaultVisibilityTimeout()
-
setDefaultVisibilityTimeout
public void setDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
The default visibility timeout (in seconds)
-
getDelaySeconds
public Integer getDelaySeconds()
-
setDelaySeconds
public void setDelaySeconds(Integer delaySeconds)
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
public Integer getMaximumMessageSize()
-
setMaximumMessageSize
public void setMaximumMessageSize(Integer maximumMessageSize)
The maximumMessageSize (in bytes) an SQS message can contain for this queue.
-
getMessageRetentionPeriod
public Integer getMessageRetentionPeriod()
-
setMessageRetentionPeriod
public void setMessageRetentionPeriod(Integer messageRetentionPeriod)
The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue.
-
getPolicy
public String getPolicy()
-
setPolicy
public void setPolicy(String policy)
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
public String getRedrivePolicy()
-
setRedrivePolicy
public void setRedrivePolicy(String redrivePolicy)
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
public Integer getReceiveMessageWaitTimeSeconds()
-
setReceiveMessageWaitTimeSeconds
public void setReceiveMessageWaitTimeSeconds(Integer receiveMessageWaitTimeSeconds)
If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait.
-
getWaitTimeSeconds
public Integer getWaitTimeSeconds()
-
setWaitTimeSeconds
public void setWaitTimeSeconds(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.
-
getQueueOwnerAWSAccountId
public String getQueueOwnerAWSAccountId()
-
setQueueOwnerAWSAccountId
public void setQueueOwnerAWSAccountId(String queueOwnerAWSAccountId)
Specify the queue owner aws account id when you need to connect the queue with different account owner.
-
isDeleteIfFiltered
public boolean isDeleteIfFiltered()
-
setDeleteIfFiltered
public void setDeleteIfFiltered(boolean deleteIfFiltered)
Whether or not to send the DeleteMessage to the SQS queue if the exchange has property with keySqs2Constants.SQS_DELETE_FILTERED
(CamelAwsSqsDeleteFiltered) set to true.
-
getRegion
public String getRegion()
-
setRegion
public void setRegion(String region)
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
-
getQueueUrl
public String getQueueUrl()
-
setQueueUrl
public void setQueueUrl(String queueUrl)
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
public String getProxyHost()
-
setProxyHost
public void setProxyHost(String proxyHost)
To define a proxy host when instantiating the SQS client
-
getProxyPort
public Integer getProxyPort()
-
setProxyPort
public void setProxyPort(Integer proxyPort)
To define a proxy port when instantiating the SQS client
-
getKmsMasterKeyId
public String getKmsMasterKeyId()
-
setKmsMasterKeyId
public void setKmsMasterKeyId(String kmsMasterKeyId)
The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.
-
getKmsDataKeyReusePeriodSeconds
public Integer getKmsDataKeyReusePeriodSeconds()
-
setKmsDataKeyReusePeriodSeconds
public void setKmsDataKeyReusePeriodSeconds(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. 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
public void setMessageGroupIdStrategy(String strategy)
Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: *useConstant*, *useExchangeId*, *usePropertyValue*. For the *usePropertyValue* option, the value of property "CamelAwsMessageGroupId" will be used.
-
setMessageGroupIdStrategy
public void setMessageGroupIdStrategy(MessageGroupIdStrategy messageGroupIdStrategy)
-
getMessageGroupIdStrategy
public MessageGroupIdStrategy getMessageGroupIdStrategy()
-
getMessageDeduplicationIdStrategy
public MessageDeduplicationIdStrategy getMessageDeduplicationIdStrategy()
-
setMessageDeduplicationIdStrategy
public void setMessageDeduplicationIdStrategy(String strategy)
Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. 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
public Sqs2Operations getOperation()
-
setOperation
public void setOperation(Sqs2Operations operation)
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 autocreation of the queue
-
getProtocol
public String getProtocol()
-
setProtocol
public void setProtocol(String protocol)
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.
-
getBatchSeparator
public String getBatchSeparator()
-
setBatchSeparator
public void setBatchSeparator(String batchSeparator)
Set the separator when passing a String to send batch message operation
-
getMessageHeaderExceededLimit
public String getMessageHeaderExceededLimit()
-
setMessageHeaderExceededLimit
public void setMessageHeaderExceededLimit(String messageHeaderExceededLimit)
What to do if sending to AWS SQS has more messages than AWS allows (currently only maximum 10 message headers is 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 uriEndpointOverride option
-
getUriEndpointOverride
public String getUriEndpointOverride()
-
setUriEndpointOverride
public void setUriEndpointOverride(String uriEndpointOverride)
Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
-
copy
public Sqs2Configuration copy()
-
-