Package io.micronaut.gcp.pubsub.bind
Class PubSubConsumerState
- java.lang.Object
-
- io.micronaut.gcp.pubsub.bind.PubSubConsumerState
-
public class PubSubConsumerState extends java.lang.ObjectStores the context of a PubSubMessage that is received. Contains all the necessary information required for the proper deserialization of the originalPubsubMessagepayload into the correspondingExecutableMethodarguments.- 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.AckReplyConsumergetAckReplyConsumer()java.lang.StringgetContentType()com.google.pubsub.v1.PubsubMessagegetPubsubMessage()com.google.pubsub.v1.ProjectSubscriptionNamegetSubscriptionName()
-
-
-
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
PubsubMessageattached to this context
-
getAckReplyConsumer
public com.google.cloud.pubsub.v1.AckReplyConsumer getAckReplyConsumer()
- Returns:
- The
AckReplyConsumerto be used for message ack.
-
getSubscriptionName
public com.google.pubsub.v1.ProjectSubscriptionName getSubscriptionName()
- Returns:
- Subscription name.
-
-