Package com.amazon.sqs.javamessaging
Class ExtendedClientConfiguration
java.lang.Object
software.amazon.payloadoffloading.PayloadStorageConfiguration
com.amazon.sqs.javamessaging.ExtendedClientConfiguration
@NotThreadSafe
public class ExtendedClientConfiguration
extends software.amazon.payloadoffloading.PayloadStorageConfiguration
Amazon SQS extended client configuration options such as Amazon S3 client,
bucket name, and message size threshold for large-payload messages.
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether or not clean up large objects in S3 is enabled.int
Deprecated.Gets the S3 key prefixboolean
Checks whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.boolean
Deprecated.Instead usePayloadStorageConfiguration.isPayloadSupportEnabled()
void
setIgnorePayloadNotFound
(boolean ignorePayloadNotFound) Sets whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.void
Deprecated.Instead usePayloadStorageConfiguration.setPayloadSupportDisabled()
void
setLargePayloadSupportEnabled
(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Deprecated.void
Disables the utilization legacy payload attribute name when sending messages.void
setMessageSizeThreshold
(int messageSizeThreshold) Deprecated.Instead usePayloadStorageConfiguration.setPayloadSizeThreshold(int)
void
setPayloadSupportEnabled
(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.void
setS3KeyPrefix
(String s3KeyPrefix) Sets a string that will be used as prefix of the S3 Key.boolean
Checks whether or not the configuration uses the legacy reserved attribute name.withAlwaysThroughS3
(boolean alwaysThroughS3) withCannedAccessControlList
(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) withIgnorePayloadNotFound
(boolean ignorePayloadNotFound) Sets whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.Deprecated.Instead usewithPayloadSupportDisabled()
withLargePayloadSupportEnabled
(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Deprecated.Instead usewithPayloadSupportEnabled(AmazonS3, String)
Disables the utilization legacy payload attribute name when sending messages.withMessageSizeThreshold
(int messageSizeThreshold) Deprecated.Instead usewithPayloadSizeThreshold(int)
withPayloadSizeThreshold
(int payloadSizeThreshold) withPayloadSupportEnabled
(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) withPayloadSupportEnabled
(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.withS3KeyPrefix
(String s3KeyPrefix) Sets a string that will be used as prefix of the S3 Key.withSSEAwsKeyManagementParams
(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) Methods inherited from class software.amazon.payloadoffloading.PayloadStorageConfiguration
getAmazonS3Client, getCannedAccessControlList, getPayloadSizeThreshold, getS3BucketName, getSSEAwsKeyManagementParams, isAlwaysThroughS3, isCannedAccessControlListDefined, isPayloadSupportEnabled, setAlwaysThroughS3, setCannedAccessControlList, setPayloadSizeThreshold, setPayloadSupportDisabled, setPayloadSupportEnabled, setSSEAwsKeyManagementParams
-
Constructor Details
-
ExtendedClientConfiguration
public ExtendedClientConfiguration() -
ExtendedClientConfiguration
-
-
Method Details
-
setPayloadSupportEnabled
public void setPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.- Parameters:
s3
- Amazon S3 client which is going to be used for storing payload messages.s3BucketName
- Name of the bucket which is going to be used for storing payload messages. The bucket must be already created and configured in s3.cleanupS3Payload
- If set to true, would handle deleting the S3 object as part of deleting the message from SQS queue. Otherwise, would not attempt to delete the object from S3. If opted to not delete S3 objects its the responsibility to the message producer to handle the clean up appropriately.
-
withPayloadSupportEnabled
public ExtendedClientConfiguration withPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.- Parameters:
s3
- Amazon S3 client which is going to be used for storing payload messages.s3BucketName
- Name of the bucket which is going to be used for storing payload messages. The bucket must be already created and configured in s3.cleanupS3Payload
- If set to true, would handle deleting the S3 object as part of deleting the message from SQS queue. Otherwise, would not attempt to delete the object from S3. If opted to not delete S3 objects its the responsibility to the message producer to handle the clean up appropriately.
-
setLegacyReservedAttributeNameDisabled
public void setLegacyReservedAttributeNameDisabled()Disables the utilization legacy payload attribute name when sending messages. -
withLegacyReservedAttributeNameDisabled
Disables the utilization legacy payload attribute name when sending messages. -
setIgnorePayloadNotFound
public void setIgnorePayloadNotFound(boolean ignorePayloadNotFound) Sets whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.- Parameters:
ignorePayloadNotFound
- Whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3. Default: false
-
withIgnorePayloadNotFound
Sets whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.- Parameters:
ignorePayloadNotFound
- Whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3. Default: false- Returns:
- the updated ExtendedClientConfiguration object.
-
doesCleanupS3Payload
public boolean doesCleanupS3Payload()Checks whether or not clean up large objects in S3 is enabled.- Returns:
- True if clean up is enabled when deleting the concerning SQS message. Default: true
-
usesLegacyReservedAttributeName
public boolean usesLegacyReservedAttributeName()Checks whether or not the configuration uses the legacy reserved attribute name.- Returns:
- True if legacy reserved attribute name is used. Default: true
-
ignoresPayloadNotFound
public boolean ignoresPayloadNotFound()Checks whether or not messages should be removed from Amazon SQS when payloads are not found in Amazon S3.- Returns:
- True if messages should be removed from Amazon SQS when payloads are not found in Amazon S3. Default: false
-
setS3KeyPrefix
Sets a string that will be used as prefix of the S3 Key.- Parameters:
s3KeyPrefix
- A S3 key prefix value
-
withS3KeyPrefix
Sets a string that will be used as prefix of the S3 Key.- Parameters:
s3KeyPrefix
- A S3 key prefix value- Returns:
- the updated ExtendedClientConfiguration object.
-
getS3KeyPrefix
Gets the S3 key prefix- Returns:
- the prefix value which is being used for compose the S3 key.
-
withAlwaysThroughS3
- Overrides:
withAlwaysThroughS3
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSupportEnabled
public ExtendedClientConfiguration withPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) - Overrides:
withPayloadSupportEnabled
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withSSEAwsKeyManagementParams
public ExtendedClientConfiguration withSSEAwsKeyManagementParams(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) - Overrides:
withSSEAwsKeyManagementParams
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSizeThreshold
- Overrides:
withPayloadSizeThreshold
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSupportDisabled
- Overrides:
withPayloadSupportDisabled
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withCannedAccessControlList
public ExtendedClientConfiguration withCannedAccessControlList(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) - Overrides:
withCannedAccessControlList
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
setLargePayloadSupportEnabled
@Deprecated public void setLargePayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Deprecated.Enables support for large-payload messages.- Parameters:
s3
- Amazon S3 client which is going to be used for storing large-payload messages.s3BucketName
- Name of the bucket which is going to be used for storing large-payload messages. The bucket must be already created and configured in s3.
-
withLargePayloadSupportEnabled
@Deprecated public ExtendedClientConfiguration withLargePayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Deprecated.Instead usewithPayloadSupportEnabled(AmazonS3, String)
Enables support for large-payload messages.- Parameters:
s3
- Amazon S3 client which is going to be used for storing large-payload messages.s3BucketName
- Name of the bucket which is going to be used for storing large-payload messages. The bucket must be already created and configured in s3.- Returns:
- the updated ExtendedClientConfiguration object.
-
setLargePayloadSupportDisabled
Deprecated.Instead usePayloadStorageConfiguration.setPayloadSupportDisabled()
Disables support for large-payload messages. -
withLargePayloadSupportDisabled
Deprecated.Instead usewithPayloadSupportDisabled()
Disables support for large-payload messages.- Returns:
- the updated ExtendedClientConfiguration object.
-
isLargePayloadSupportEnabled
Deprecated.Instead usePayloadStorageConfiguration.isPayloadSupportEnabled()
Check if the support for large-payload message if enabled.- Returns:
- true if support for large-payload messages is enabled.
-
setMessageSizeThreshold
Deprecated.Instead usePayloadStorageConfiguration.setPayloadSizeThreshold(int)
Sets the message size threshold for storing message payloads in Amazon S3.- Parameters:
messageSizeThreshold
- Message size threshold to be used for storing in Amazon S3. Default: 256KB.
-
withMessageSizeThreshold
Deprecated.Instead usewithPayloadSizeThreshold(int)
Sets the message size threshold for storing message payloads in Amazon S3.- Parameters:
messageSizeThreshold
- Message size threshold to be used for storing in Amazon S3. Default: 256KB.- Returns:
- the updated ExtendedClientConfiguration object.
-
getMessageSizeThreshold
Deprecated.Instead usePayloadStorageConfiguration.getPayloadSizeThreshold()
Gets the message size threshold for storing message payloads in Amazon S3.- Returns:
- Message size threshold which is being used for storing in Amazon S3. Default: 256KB.
-
PayloadStorageConfiguration.getPayloadSizeThreshold()