public interface PubsubMessageOrBuilder extends MessageOrBuilder
Implements
MessageOrBuilderMethods
containsAttributes(String key)
public abstract boolean containsAttributes(String key)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
getAttributes()
public abstract Map<String,String> getAttributes()
Use #getAttributesMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getAttributesCount()
public abstract int getAttributesCount()
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
Returns | |
---|---|
Type | Description |
int |
getAttributesMap()
public abstract Map<String,String> getAttributesMap()
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
Returns | |
---|---|
Type | Description |
Map<String,String> |
getAttributesOrDefault(String key, String defaultValue)
public abstract String getAttributesOrDefault(String key, String defaultValue)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | String |
Returns | |
---|---|
Type | Description |
String |
getAttributesOrThrow(String key)
public abstract String getAttributesOrThrow(String key)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
String |
getData()
public abstract ByteString getData()
The message data field. If this field is empty, the message must contain at least one attribute.
bytes data = 1;
Returns | |
---|---|
Type | Description |
ByteString | The data. |
getMessageId()
public abstract String getMessageId()
ID of this message, assigned by the server when the message is published.
Guaranteed to be unique within the topic. This value may be read by a
subscriber that receives a PubsubMessage
via a Pull
call or a push
delivery. It must not be populated by the publisher in a Publish
call.
string message_id = 3;
Returns | |
---|---|
Type | Description |
String | The messageId. |
getMessageIdBytes()
public abstract ByteString getMessageIdBytes()
ID of this message, assigned by the server when the message is published.
Guaranteed to be unique within the topic. This value may be read by a
subscriber that receives a PubsubMessage
via a Pull
call or a push
delivery. It must not be populated by the publisher in a Publish
call.
string message_id = 3;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for messageId. |
getOrderingKey()
public abstract String getOrderingKey()
If non-empty, identifies related messages for which publish order should be
respected. If a Subscription
has enable_message_ordering
set to true
,
messages published with the same non-empty ordering_key
value will be
delivered to subscribers in the order in which they are received by the
Pub/Sub system. All PubsubMessage
s published in a given PublishRequest
must specify the same ordering_key
value.
string ordering_key = 5;
Returns | |
---|---|
Type | Description |
String | The orderingKey. |
getOrderingKeyBytes()
public abstract ByteString getOrderingKeyBytes()
If non-empty, identifies related messages for which publish order should be
respected. If a Subscription
has enable_message_ordering
set to true
,
messages published with the same non-empty ordering_key
value will be
delivered to subscribers in the order in which they are received by the
Pub/Sub system. All PubsubMessage
s published in a given PublishRequest
must specify the same ordering_key
value.
string ordering_key = 5;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for orderingKey. |
getPublishTime()
public abstract Timestamp getPublishTime()
The time at which the message was published, populated by the server when
it receives the Publish
call. It must not be populated by the
publisher in a Publish
call.
.google.protobuf.Timestamp publish_time = 4;
Returns | |
---|---|
Type | Description |
Timestamp | The publishTime. |
getPublishTimeOrBuilder()
public abstract TimestampOrBuilder getPublishTimeOrBuilder()
The time at which the message was published, populated by the server when
it receives the Publish
call. It must not be populated by the
publisher in a Publish
call.
.google.protobuf.Timestamp publish_time = 4;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
hasPublishTime()
public abstract boolean hasPublishTime()
The time at which the message was published, populated by the server when
it receives the Publish
call. It must not be populated by the
publisher in a Publish
call.
.google.protobuf.Timestamp publish_time = 4;
Returns | |
---|---|
Type | Description |
boolean | Whether the publishTime field is set. |