Interface SqsDestination

All Superinterfaces:
Destination

public interface SqsDestination extends Destination

AWS SQS is a pull-queue on AWS. The queue must be a Standard queue type with a MaximumMessageSize of 256 KB.

We recommend setting authenticationMode to IAM, to avoid unnecessary key management. For IAM authentication and before creating the Subscription, give permissions to the following user account: arn:aws:iam::362576667341:user/subscriptions. Otherwise, a test message will not be sent.

If you prefer to use Credentials for authentication, we recommend creating an IAM user with an accessKey and accessSecret pair specifically for each Subscription.

The IAM user should only have the sqs:SendMessage permission on this queue.


Example to create an instance using the builder pattern

     SqsDestination sqsDestination = SqsDestination.builder()
             .queueUrl("{queueUrl}")
             .region("{region}")
             .build()
 
  • Field Details

  • Method Details

    • getAccessKey

      String getAccessKey()

      Only present if authenticationMode is set to Credentials.

      Returns:
      accessKey
    • getAccessSecret

      String getAccessSecret()

      Only present if authenticationMode is set to Credentials.

      Returns:
      accessSecret
    • getQueueUrl

      @NotNull @NotNull String getQueueUrl()

      URL of the Amazon SQS queue.

      Returns:
      queueUrl
    • getRegion

      @NotNull @NotNull String getRegion()

      AWS Region the message queue is located in.

      Returns:
      region
    • getAuthenticationMode

      AwsAuthenticationMode getAuthenticationMode()

      Defines the method of authentication for the SQS queue.

      Returns:
      authenticationMode
    • setAccessKey

      void setAccessKey(String accessKey)

      Only present if authenticationMode is set to Credentials.

      Parameters:
      accessKey - value to be set
    • setAccessSecret

      void setAccessSecret(String accessSecret)

      Only present if authenticationMode is set to Credentials.

      Parameters:
      accessSecret - value to be set
    • setQueueUrl

      void setQueueUrl(String queueUrl)

      URL of the Amazon SQS queue.

      Parameters:
      queueUrl - value to be set
    • setRegion

      void setRegion(String region)

      AWS Region the message queue is located in.

      Parameters:
      region - value to be set
    • setAuthenticationMode

      void setAuthenticationMode(AwsAuthenticationMode authenticationMode)

      Defines the method of authentication for the SQS queue.

      Parameters:
      authenticationMode - value to be set
    • of

      static SqsDestination of()
      factory method
      Returns:
      instance of SqsDestination
    • of

      static SqsDestination of(SqsDestination template)
      factory method to create a shallow copy SqsDestination
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static SqsDestination deepCopy(@Nullable SqsDestination template)
      factory method to create a deep copy of SqsDestination
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static SqsDestinationBuilder builder()
      builder factory method for SqsDestination
      Returns:
      builder
    • builder

      static SqsDestinationBuilder builder(SqsDestination template)
      create builder for SqsDestination instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withSqsDestination

      default <T> T withSqsDestination(Function<SqsDestination,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<SqsDestination> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference