Interface SnsAsyncOperations
- All Known Implementing Classes:
SnsAsyncTemplate
public interface SnsAsyncOperations
High level asynchronous SNS operations.
- Since:
- 4.1.0
- Author:
- Matej Nedic
-
Method Summary
Modifier and TypeMethodDescriptionconvertAndSend(String destination, T payload) Converts and sends a payload to a destination.convertAndSend(String destination, T payload, @Nullable Map<String, Object> headers) Converts and sends a payload with headers to a destination.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.convertAndSend(String destination, T payload, @Nullable MessagePostProcessor postProcessor) Converts and sends a payload with a post processor to a destination.Sends a message to a destination.sendNotification(String topic, SnsNotification<T> notification) Sends a notification to a topic.sendNotification(String destinationName, Object message, @Nullable String subject) Sends a notification with a message and subject to a destination.topicExists(String topicArn) Checks if a topic with the given ARN exists.
-
Method Details
-
send
Sends a message to a destination.- Type Parameters:
T- the message payload type- Parameters:
destination- the destination namemessage- the message to send- Returns:
- a CompletableFuture with the result
-
convertAndSend
Converts and sends a payload to a destination.- Type Parameters:
T- the payload type- Parameters:
destination- the destination namepayload- 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 namepayload- the payload to sendheaders- 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 namepayload- the payload to sendpostProcessor- 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 namepayload- the payload to sendheaders- the headers to includepostProcessor- 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 namemessage- the message to sendsubject- 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 namenotification- the notification to send- Returns:
- a CompletableFuture with the result
-
topicExists
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
-