Package io.micronaut.gcp.pubsub.bind
Class PubSubConsumerState
- java.lang.Object
-
- io.micronaut.gcp.pubsub.bind.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 originalPubsubMessage
payload into the correspondingExecutableMethod
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.cloud.pubsub.v1.AckReplyConsumer
getAckReplyConsumer()
java.lang.String
getContentType()
com.google.pubsub.v1.PubsubMessage
getPubsubMessage()
com.google.pubsub.v1.ProjectSubscriptionName
getSubscriptionName()
-
-
-
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.
-
-