Reference documentation and code samples for the Cloud PubSub V1 Client class PublishRequest.
Request for the Publish method.
Generated from protobuf message google.pubsub.v1.PublishRequest
Namespace
Google \ Cloud \ PubSub \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ topic |
string
Required. The messages in the request will be published on this topic. Format is |
↳ messages |
array<PubsubMessage>
Required. The messages to publish. |
getTopic
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
Returns | |
---|---|
Type | Description |
string |
setTopic
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMessages
Required. The messages to publish.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setMessages
Required. The messages to publish.
Parameter | |
---|---|
Name | Description |
var |
array<PubsubMessage>
|
Returns | |
---|---|
Type | Description |
$this |
static::build
Parameters | |
---|---|
Name | Description |
topic |
string
Required. The messages in the request will be published on this topic.
Format is |
messages |
array<PubsubMessage>
Required. The messages to publish. |
Returns | |
---|---|
Type | Description |
PublishRequest |