Class PubsubMessage
java.lang.Object
org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage
Class representing a Pub/Sub message. Each message contains a single message payload, a map of
attached attributes, a message id and an ordering key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAttribute
(String attribute) Returns the given attribute value.Returns the full map of attributes.Returns the messageId of the message populated by Cloud Pub/Sub.Returns the ordering key of the message.byte[]
Returns the main PubSub message.getTopic()
int
hashCode()
toString()
withOrderingKey
(@Nullable String orderingKey)
-
Constructor Details
-
PubsubMessage
-
PubsubMessage
-
PubsubMessage
-
-
Method Details
-
withTopic
-
getTopic
-
getPayload
public byte[] getPayload()Returns the main PubSub message. -
getAttribute
Returns the given attribute value. If not such attribute exists, returns null. -
getAttributeMap
Returns the full map of attributes. This is an unmodifiable map. -
getMessageId
Returns the messageId of the message populated by Cloud Pub/Sub. -
withOrderingKey
-
getOrderingKey
Returns the ordering key of the message. -
toString
-
equals
-
hashCode
public int hashCode()
-