Class AmazonSQSImplementation

  • All Implemented Interfaces:
    com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig, ComponentLifecycleExtension, ConnectionComparator<VendorImplementationBase>, VendorImplementation, VendorImplementationBase
    Direct Known Subclasses:
    AdvancedSQSImplementation

    public class AmazonSQSImplementation
    extends VendorImplementationImp
    implements com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
    JMS VendorImplementation for Amazon SQS.

    This VendorImplementation uses the Amazon SQS JMS compatibility layer. When using this class, do not use the AmazonSQS Producer and Consumer classes. Use regular JMS consumers and producers instead.

    Since:
    3.0.3

    In the adapter configuration file this class is aliased as amazon-sqs-implementation which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • AmazonSQSImplementation

        public AmazonSQSImplementation()
    • Method Detail

      • createConnectionFactory

        public com.amazon.sqs.javamessaging.SQSConnectionFactory createConnectionFactory()
                                                                                  throws javax.jms.JMSException
        Specified by:
        createConnectionFactory in interface VendorImplementation
        Throws:
        javax.jms.JMSException
      • build

        protected com.amazon.sqs.javamessaging.SQSConnectionFactory build()
                                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • buildClientConfiguration

        protected com.amazonaws.ClientConfiguration buildClientConfiguration()
                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • credentialsProvider

        protected com.adaptris.aws.AWSCredentialsProviderBuilder credentialsProvider()
      • prefetchCount

        protected int prefetchCount()
      • withCredentialsProviderBuilder

        public <T extends AmazonSQSImplementation> T withCredentialsProviderBuilder​(com.adaptris.aws.AWSCredentialsProviderBuilder builder)
      • endpointBuilder

        public com.adaptris.aws.EndpointBuilder endpointBuilder()
        Specified by:
        endpointBuilder in interface com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
      • retryPolicy

        public com.adaptris.aws.RetryPolicyFactory retryPolicy()
        Specified by:
        retryPolicy in interface com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
      • clientConfiguration

        public KeyValuePairSet clientConfiguration()
        Specified by:
        clientConfiguration in interface com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
      • newProviderConfiguration

        protected com.amazon.sqs.javamessaging.ProviderConfiguration newProviderConfiguration()
      • getRegion

        public java.lang.String getRegion()
        Set the region for the client.

        If the region is not specified, then DefaultAwsRegionProviderChain is used to determine the region. You can always specify a region using the standard system property aws.region or via environment variables.

      • setRegion

        public void setRegion​(java.lang.String region)
        Set the region for the client.

        If the region is not specified, then DefaultAwsRegionProviderChain is used to determine the region. You can always specify a region using the standard system property aws.region or via environment variables.

      • getCredentials

        public com.adaptris.aws.AWSCredentialsProviderBuilder getCredentials()
        How to provide Credentials for AWS.

        If not specified, then a static credentials provider with a default provider chain will be used.

      • setCredentials

        public void setCredentials​(com.adaptris.aws.AWSCredentialsProviderBuilder credentials)
        How to provide Credentials for AWS.

        If not specified, then a static credentials provider with a default provider chain will be used.

      • getPrefetchCount

        public java.lang.Integer getPrefetchCount()
        The maximum number of messages to retrieve from the Amazon SQS queue per request.
      • setPrefetchCount

        public void setPrefetchCount​(java.lang.Integer prefetchCount)
        The maximum number of messages to retrieve from the Amazon SQS queue per request.
      • getSqsClientFactory

        @NonNull
        public @NonNull SQSClientFactory getSqsClientFactory()
        How to create the SQS client and set parameters.
      • setSqsClientFactory

        public void setSqsClientFactory​(@NonNull
                                        @NonNull SQSClientFactory sqsClientFactory)
        How to create the SQS client and set parameters.