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.boolean
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
(software.amazon.awssdk.services.s3.S3Client 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
(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.boolean
Checks whether or not the configuration uses the legacy reserved attribute name.withAlwaysThroughS3
(boolean alwaysThroughS3) 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
(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName) Deprecated.Instead usewithPayloadSupportEnabled(S3Client, String)
Disables the utilization legacy payload attribute name when sending messages.withMessageSizeThreshold
(int messageSizeThreshold) Deprecated.Instead usewithPayloadSizeThreshold(int)
withObjectCannedACL
(software.amazon.awssdk.services.s3.model.ObjectCannedACL objectCannedACL) withPayloadSizeThreshold
(int payloadSizeThreshold) withPayloadSupportEnabled
(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName) withPayloadSupportEnabled
(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName, boolean cleanupS3Payload) Enables support for payload messages.withServerSideEncryption
(software.amazon.payloadoffloading.ServerSideEncryptionStrategy serverSideEncryption) Methods inherited from class software.amazon.payloadoffloading.PayloadStorageConfiguration
getObjectCannedACL, getPayloadSizeThreshold, getS3BucketName, getS3Client, getServerSideEncryptionStrategy, isAlwaysThroughS3, isObjectCannedACLDefined, isPayloadSupportEnabled, setAlwaysThroughS3, setObjectCannedACL, setPayloadSizeThreshold, setPayloadSupportDisabled, setPayloadSupportEnabled, setServerSideEncryptionStrategy
-
Constructor Details
-
ExtendedClientConfiguration
public ExtendedClientConfiguration() -
ExtendedClientConfiguration
-
-
Method Details
-
setPayloadSupportEnabled
public void setPayloadSupportEnabled(software.amazon.awssdk.services.s3.S3Client 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(software.amazon.awssdk.services.s3.S3Client 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
-
withAlwaysThroughS3
- Overrides:
withAlwaysThroughS3
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSupportEnabled
public ExtendedClientConfiguration withPayloadSupportEnabled(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName) - Overrides:
withPayloadSupportEnabled
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withObjectCannedACL
public ExtendedClientConfiguration withObjectCannedACL(software.amazon.awssdk.services.s3.model.ObjectCannedACL objectCannedACL) - Overrides:
withObjectCannedACL
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSizeThreshold
- Overrides:
withPayloadSizeThreshold
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withPayloadSupportDisabled
- Overrides:
withPayloadSupportDisabled
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
withServerSideEncryption
public ExtendedClientConfiguration withServerSideEncryption(software.amazon.payloadoffloading.ServerSideEncryptionStrategy serverSideEncryption) - Overrides:
withServerSideEncryption
in classsoftware.amazon.payloadoffloading.PayloadStorageConfiguration
-
setLargePayloadSupportEnabled
@Deprecated public void setLargePayloadSupportEnabled(software.amazon.awssdk.services.s3.S3Client 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(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName) Deprecated.Instead usewithPayloadSupportEnabled(S3Client, 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()