Class PubSubConsumerState

java.lang.Object
io.micronaut.gcp.pubsub.bind.PubSubConsumerState

public class PubSubConsumerState extends 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 Details

    • PubSubConsumerState

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

    • getContentType

      public 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.