Class SNSMessageProducer
java.lang.Object
overit.geocall.aws.event.producer.SNSMessageProducer
- All Implemented Interfaces:
MessageProducer<String,software.amazon.awssdk.services.sns.model.PublishResponse>
public class SNSMessageProducer
extends Object
implements MessageProducer<String,software.amazon.awssdk.services.sns.model.PublishResponse>
This class publishes a message on AWS Simple Notification Service (SNS) in an asynchronous way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Identitysend(String message, ProducerProperties producerProperties, String classDTO, MessageScope scope) Asynchronously issues the given object onto the SNS channel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.event.producer.MessageProducer
init
-
Constructor Details
-
SNSMessageProducer
public SNSMessageProducer()Initializes a newly createdSNSMessageProducerobject.
-
-
Method Details
-
getIdentity
-
send
public MessageResult send(String message, ProducerProperties producerProperties, String classDTO, MessageScope scope) throws MessageDispatchException Asynchronously issues the given object onto the SNS channel.- Specified by:
sendin interfaceMessageProducer<String,software.amazon.awssdk.services.sns.model.PublishResponse> - Parameters:
message- the object to be sent as payloadproducerProperties- properties that define the producerclassDTO- schema name of the data transfer objectscope- scope of the message related to the type of event triggered- Returns:
MessageResultthe result that has been acknowledged by the Message Broker- Throws:
MessageDispatchException- in case of failure while sending the message
-