public class PubsubMessage
extends java.lang.Object
Constructor and Description |
---|
PubsubMessage(byte[] payload,
java.util.Map<java.lang.String,java.lang.String> attributes) |
PubsubMessage(byte[] payload,
java.util.Map<java.lang.String,java.lang.String> attributes,
java.lang.String messageId) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute(java.lang.String attribute)
Returns the given attribute value.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributeMap()
Returns the full map of attributes.
|
java.lang.String |
getMessageId()
Returns the messageId of the message populated by Cloud Pub/Sub.
|
byte[] |
getPayload()
Returns the main PubSub message.
|
java.lang.String |
toString() |
public PubsubMessage(byte[] payload, @Nullable java.util.Map<java.lang.String,java.lang.String> attributes)
public byte[] getPayload()
@Nullable public java.lang.String getAttribute(java.lang.String attribute)
@Nullable public java.util.Map<java.lang.String,java.lang.String> getAttributeMap()
@Nullable public java.lang.String getMessageId()
public java.lang.String toString()
toString
in class java.lang.Object