Class GcpPubSubHeaders
java.lang.Object
com.google.cloud.spring.pubsub.support.GcpPubSubHeaders
Google Cloud internal headers for Spring Messaging messages.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOriginalMessage
(org.springframework.messaging.Message<?> message) A simple utility method for pulling theORIGINAL_MESSAGE
header out of aMessage
.
-
Field Details
-
CLIENT
The client header text.- See Also:
-
TOPIC
The topic header text.- See Also:
-
ORIGINAL_MESSAGE
The original message header text.- See Also:
-
ORDERING_KEY
The Pub/Sub message ordering key.- See Also:
-
-
Method Details
-
getOriginalMessage
public static Optional<BasicAcknowledgeablePubsubMessage> getOriginalMessage(org.springframework.messaging.Message<?> message) A simple utility method for pulling theORIGINAL_MESSAGE
header out of aMessage
.- Parameters:
message
- The Spring Message that was converted by aPubSubInboundChannelAdapter
.- Returns:
- An Optional possibly containing a BasicAcknowledgeablePubsubMessage for acking and nacking.
-