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 |
---|---|
boolean |
equals(java.lang.Object other) |
@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.
|
int |
hashCode() |
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
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object