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 Details

    • SNSMessageProducer

      public SNSMessageProducer()
      Initializes a newly created SNSMessageProducer object.
  • Method Details

    • getIdentity

      protected Identity 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:
      send in interface MessageProducer<String,software.amazon.awssdk.services.sns.model.PublishResponse>
      Parameters:
      message - the object to be sent as payload
      producerProperties - properties that define the producer
      classDTO - schema name of the data transfer object
      scope - scope of the message related to the type of event triggered
      Returns:
      MessageResult the result that has been acknowledged by the Message Broker
      Throws:
      MessageDispatchException - in case of failure while sending the message