PubsubMessage
class PubsubMessage extends Message
A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.
Protobuf type Google\Pubsub\V1\PubsubMessage
Methods
No description
The message payload.
The message payload.
Optional attributes for this message.
Optional attributes for this message.
ID of this message, assigned by the server when the message is published.
ID of this message, assigned by the server when the message is published.
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.
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.
Details
at line 49
__construct()
at line 60
string
getData()
The message payload.
Generated from protobuf field bytes data = 1;
at line 71
setData(string $var)
The message payload.
Generated from protobuf field bytes data = 1;
at line 83
RepeatedField
getAttributes()
Optional attributes for this message.
Generated from protobuf field map<string, string> attributes = 2;
at line 94
setAttributes(array|RepeatedField $var)
Optional attributes for this message.
Generated from protobuf field map<string, string> attributes = 2;
at line 109
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.
Generated from protobuf field string message_id = 3;
at line 123
setMessageId(string $var)
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.
Generated from protobuf field string message_id = 3;
at line 137
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.
Generated from protobuf field .google.protobuf.Timestamp publish_time = 4;
at line 150
setPublishTime(Timestamp $var)
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.
Generated from protobuf field .google.protobuf.Timestamp publish_time = 4;