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 Details

    • ExtendedClientConfiguration

      public ExtendedClientConfiguration()
    • ExtendedClientConfiguration

      public ExtendedClientConfiguration(ExtendedClientConfiguration other)
  • 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

      public ExtendedClientConfiguration 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

      public ExtendedClientConfiguration withIgnorePayloadNotFound(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
      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

      public ExtendedClientConfiguration withAlwaysThroughS3(boolean alwaysThroughS3)
      Overrides:
      withAlwaysThroughS3 in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • withPayloadSupportEnabled

      public ExtendedClientConfiguration withPayloadSupportEnabled(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName)
      Overrides:
      withPayloadSupportEnabled in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • withObjectCannedACL

      public ExtendedClientConfiguration withObjectCannedACL(software.amazon.awssdk.services.s3.model.ObjectCannedACL objectCannedACL)
      Overrides:
      withObjectCannedACL in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • withPayloadSizeThreshold

      public ExtendedClientConfiguration withPayloadSizeThreshold(int payloadSizeThreshold)
      Overrides:
      withPayloadSizeThreshold in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • withPayloadSupportDisabled

      public ExtendedClientConfiguration withPayloadSupportDisabled()
      Overrides:
      withPayloadSupportDisabled in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • withServerSideEncryption

      public ExtendedClientConfiguration withServerSideEncryption(software.amazon.payloadoffloading.ServerSideEncryptionStrategy serverSideEncryption)
      Overrides:
      withServerSideEncryption in class software.amazon.payloadoffloading.PayloadStorageConfiguration
    • setLargePayloadSupportEnabled

      @Deprecated public void setLargePayloadSupportEnabled(software.amazon.awssdk.services.s3.S3Client s3, String s3BucketName)
      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)
      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 public void setLargePayloadSupportDisabled()
      Deprecated.
      Instead use PayloadStorageConfiguration.setPayloadSupportDisabled()
      Disables support for large-payload messages.
    • withLargePayloadSupportDisabled

      @Deprecated public ExtendedClientConfiguration withLargePayloadSupportDisabled()
      Deprecated.
      Disables support for large-payload messages.
      Returns:
      the updated ExtendedClientConfiguration object.
    • isLargePayloadSupportEnabled

      @Deprecated public boolean isLargePayloadSupportEnabled()
      Deprecated.
      Instead use PayloadStorageConfiguration.isPayloadSupportEnabled()
      Check if the support for large-payload message if enabled.
      Returns:
      true if support for large-payload messages is enabled.
    • setMessageSizeThreshold

      @Deprecated public void setMessageSizeThreshold(int messageSizeThreshold)
      Deprecated.
      Instead use PayloadStorageConfiguration.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 public ExtendedClientConfiguration withMessageSizeThreshold(int messageSizeThreshold)
      Deprecated.
      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 public int getMessageSizeThreshold()
      Deprecated.
      Instead use PayloadStorageConfiguration.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.