Interface SnsAsyncOperations

All Known Implementing Classes:
SnsAsyncTemplate

public interface SnsAsyncOperations
High level asynchronous SNS operations.
Since:
4.1.0
Author:
Matej Nedic
  • Method Details

    • send

      <T> CompletableFuture<PublishMessageResult<T>> send(String destination, Message<T> message)
      Sends a message to a destination.
      Type Parameters:
      T - the message payload type
      Parameters:
      destination - the destination name
      message - the message to send
      Returns:
      a CompletableFuture with the result
    • convertAndSend

      <T> CompletableFuture<PublishMessageResult<T>> convertAndSend(String destination, T payload)
      Converts and sends a payload to a destination.
      Type Parameters:
      T - the payload type
      Parameters:
      destination - the destination name
      payload - the payload to send
      Returns:
      a CompletableFuture with the result
    • convertAndSend

      <T> CompletableFuture<PublishMessageResult<T>> convertAndSend(String destination, T payload, @Nullable Map<String,Object> headers)
      Converts and sends a payload with headers to a destination.
      Type Parameters:
      T - the payload type
      Parameters:
      destination - the destination name
      payload - the payload to send
      headers - the headers to include
      Returns:
      a CompletableFuture with the result
    • convertAndSend

      <T> CompletableFuture<PublishMessageResult<T>> convertAndSend(String destination, T payload, @Nullable MessagePostProcessor postProcessor)
      Converts and sends a payload with a post processor to a destination.
      Type Parameters:
      T - the payload type
      Parameters:
      destination - the destination name
      payload - the payload to send
      postProcessor - the post processor to apply
      Returns:
      a CompletableFuture with the result
    • convertAndSend

      <T> CompletableFuture<PublishMessageResult<T>> convertAndSend(String destination, T payload, @Nullable Map<String,Object> headers, @Nullable MessagePostProcessor postProcessor)
      Converts and sends a payload with headers and a post processor to a destination.
      Type Parameters:
      T - the payload type
      Parameters:
      destination - the destination name
      payload - the payload to send
      headers - the headers to include
      postProcessor - the post processor to apply
      Returns:
      a CompletableFuture with the result
    • sendNotification

      CompletableFuture<PublishMessageResult<Object>> sendNotification(String destinationName, Object message, @Nullable String subject)
      Sends a notification with a message and subject to a destination.
      Parameters:
      destinationName - the destination name
      message - the message to send
      subject - the subject (can be null)
      Returns:
      a CompletableFuture with the result
    • sendNotification

      <T> CompletableFuture<PublishMessageResult<T>> sendNotification(String topic, SnsNotification<T> notification)
      Sends a notification to a topic.
      Type Parameters:
      T - the notification payload type
      Parameters:
      topic - the topic name
      notification - the notification to send
      Returns:
      a CompletableFuture with the result
    • topicExists

      CompletableFuture<Boolean> topicExists(String topicArn)
      Checks if a topic with the given ARN exists.
      Parameters:
      topicArn - the ARN of the topic
      Returns:
      a CompletableFuture with true if the topic exists, false otherwise