Class PubSubConsumerState


  • public class PubSubConsumerState
    extends java.lang.Object
    Stores the context of a PubSubMessage that is received. Contains all the necessary information required for the proper deserialization of the original PubsubMessage payload into the corresponding ExecutableMethod arguments.
    Since:
    2.0.0
    Author:
    Vinicius Carvalho
    • Constructor Summary

      Constructors 
      Constructor Description
      PubSubConsumerState​(com.google.pubsub.v1.PubsubMessage pubsubMessage, com.google.cloud.pubsub.v1.AckReplyConsumer ackReplyConsumer, com.google.pubsub.v1.ProjectSubscriptionName subscriptionName, java.lang.String contentType)  
    • Constructor Detail

      • PubSubConsumerState

        public PubSubConsumerState​(com.google.pubsub.v1.PubsubMessage pubsubMessage,
                                   com.google.cloud.pubsub.v1.AckReplyConsumer ackReplyConsumer,
                                   com.google.pubsub.v1.ProjectSubscriptionName subscriptionName,
                                   java.lang.String contentType)
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Returns:
        Content-Type associated to this context
      • getPubsubMessage

        public com.google.pubsub.v1.PubsubMessage getPubsubMessage()
        Returns:
        the original PubsubMessage attached to this context
      • getAckReplyConsumer

        public com.google.cloud.pubsub.v1.AckReplyConsumer getAckReplyConsumer()
        Returns:
        The AckReplyConsumer to be used for message ack.
      • getSubscriptionName

        public com.google.pubsub.v1.ProjectSubscriptionName getSubscriptionName()
        Returns:
        Subscription name.