Class SnsMessage

  • All Implemented Interfaces:
    Message<String>

    public class SnsMessage
    extends Object
    implements Message<String>
    Implementation of Message for SNS. Currently, it only support payload of type String.
    Author:
    iabughosh
    • Constructor Detail

      • SnsMessage

        public SnsMessage​(com.amazonaws.services.sns.message.SnsNotification snsNotification)
        Constructor for AWS SNS.
        Parameters:
        snsNotification - the notification, must not be null
      • SnsMessage

        public SnsMessage​(String payload)
        Constructor for fake SNS.
        Parameters:
        payload - the payload.
    • Method Detail

      • ack

        public CompletionStage<Void> ack()
        Description copied from interface: Message
        Acknowledge this message.
        Specified by:
        ack in interface Message<String>
        Returns:
        a completion stage completed when the message is acknowledged. If the acknowledgement fails, the completion stage propagates the failure.
      • getSubject

        public String getSubject()
        Get message subject of SNS notification.
        Returns:
        message subject.