Package io.micronaut.gcp.pubsub.bind
Class PubSubConsumerState
java.lang.Object
io.micronaut.gcp.pubsub.bind.PubSubConsumerState
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
ConstructorDescriptionPubSubConsumerState
(com.google.pubsub.v1.PubsubMessage pubsubMessage, com.google.cloud.pubsub.v1.AckReplyConsumer ackReplyConsumer, com.google.pubsub.v1.ProjectSubscriptionName subscriptionName, String contentType) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.pubsub.v1.AckReplyConsumer
com.google.pubsub.v1.PubsubMessage
com.google.pubsub.v1.ProjectSubscriptionName
-
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
- 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.
-