public class PubsubMessage
extends java.lang.Object
Constructor and Description |
---|
PubsubMessage(byte[] payload,
@Nullable java.util.Map<java.lang.String,java.lang.String> attributes) |
PubsubMessage(byte[] payload,
@Nullable java.util.Map<java.lang.String,java.lang.String> attributes,
@Nullable java.lang.String messageId) |
Modifier and Type | Method and Description |
---|---|
@Nullable java.lang.String |
getAttribute(java.lang.String attribute)
Returns the given attribute value.
|
@Nullable java.util.Map<java.lang.String,java.lang.String> |
getAttributeMap()
Returns the full map of attributes.
|
@Nullable 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 PubsubMessage(byte[] payload, @Nullable java.util.Map<java.lang.String,java.lang.String> attributes, @Nullable java.lang.String messageId)
public byte[] getPayload()
public @Nullable java.lang.String getAttribute(java.lang.String attribute)
public @Nullable java.util.Map<java.lang.String,java.lang.String> getAttributeMap()
public @Nullable java.lang.String getMessageId()
public java.lang.String toString()
toString
in class java.lang.Object