Class SqsConfiguration
- java.lang.Object
-
- org.apache.camel.component.aws.sqs.SqsConfiguration
-
-
Constructor Summary
Constructors Constructor Description SqsConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqsConfiguration
copy()
String
getAccessKey()
String
getAmazonAWSHost()
com.amazonaws.services.sqs.AmazonSQS
getAmazonSQSClient()
String
getAttributeNames()
int
getConcurrentConsumers()
Integer
getDefaultVisibilityTimeout()
Integer
getDelaySeconds()
Integer
getKmsDataKeyReusePeriodSeconds()
String
getKmsMasterKeyId()
Integer
getMaximumMessageSize()
String
getMessageAttributeNames()
MessageDeduplicationIdStrategy
getMessageDeduplicationIdStrategy()
MessageGroupIdStrategy
getMessageGroupIdStrategy()
Integer
getMessageRetentionPeriod()
SqsOperations
getOperation()
String
getPolicy()
String
getProtocol()
String
getProxyHost()
Integer
getProxyPort()
com.amazonaws.Protocol
getProxyProtocol()
String
getQueueName()
String
getQueueOwnerAWSAccountId()
String
getQueueUrl()
Integer
getReceiveMessageWaitTimeSeconds()
String
getRedrivePolicy()
String
getRegion()
String
getSecretKey()
Integer
getVisibilityTimeout()
Integer
getWaitTimeSeconds()
boolean
isAutoCreateQueue()
boolean
isAutoDiscoverClient()
boolean
isDelayQueue()
boolean
isDeleteAfterRead()
boolean
isDeleteIfFiltered()
boolean
isExtendMessageVisibility()
boolean
isServerSideEncryptionEnabled()
void
setAccessKey(String accessKey)
Amazon AWS Access Keyvoid
setAmazonAWSHost(String amazonAWSHost)
The hostname of the Amazon AWS cloud.void
setAmazonSQSClient(com.amazonaws.services.sqs.AmazonSQS 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
setAutoDiscoverClient(boolean autoDiscoverClient)
Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking.void
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 an exchange fails to get through a filter.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
setMessageRetentionPeriod(Integer messageRetentionPeriod)
The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue.void
setOperation(SqsOperations operation)
The operation to do in case the user don't want to send only a messagevoid
setPolicy(String policy)
The policy for this queuevoid
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(com.amazonaws.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)
Specify the queue region which could be used with queueOwnerAWSAccountId to build the service URL.void
setSecretKey(String secretKey)
Amazon AWS Secret Keyvoid
setServerSideEncryptionEnabled(boolean serverSideEncryptionEnabled)
Define if Server Side Encryption is enabled or not on the queuevoid
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 com.amazonaws.services.sqs.AmazonSQS getAmazonSQSClient()
-
setAmazonSQSClient
public void setAmazonSQSClient(com.amazonaws.services.sqs.AmazonSQS 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
-
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 an exchange fails to get through a filter. If 'false' and exchange does not make it through a Camel filter upstream in the route, then don't send DeleteMessage.
-
getRegion
public String getRegion()
-
setRegion
public void setRegion(String region)
Specify the queue region which could be used with queueOwnerAWSAccountId to build the service URL. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name()
-
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 com.amazonaws.Protocol getProxyProtocol()
-
setProxyProtocol
public void setProxyProtocol(com.amazonaws.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 SqsOperations getOperation()
-
setOperation
public void setOperation(SqsOperations 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
-
isAutoDiscoverClient
public boolean isAutoDiscoverClient()
-
setAutoDiscoverClient
public void setAutoDiscoverClient(boolean autoDiscoverClient)
Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking.
-
copy
public SqsConfiguration copy()
-
-