class PublisherGrpcClient extends BaseStub

The service that an application uses to manipulate topics, and to send messages to a topic.

Methods

__construct(string $hostname, array $opts, Channel $channel = null)

No description

CreateTopic(Topic $argument, array $metadata = [], array $options = [])

Creates the given topic with the given name.

Publish(PublishRequest $argument, array $metadata = [], array $options = [])

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

GetTopic(GetTopicRequest $argument, array $metadata = [], array $options = [])

Gets the configuration of a topic.

ListTopics(ListTopicsRequest $argument, array $metadata = [], array $options = [])

Lists matching topics.

ListTopicSubscriptions(ListTopicSubscriptionsRequest $argument, array $metadata = [], array $options = [])

Lists the name of the subscriptions for this topic.

DeleteTopic(DeleteTopicRequest $argument, array $metadata = [], array $options = [])

Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_.

Details

at line 32
__construct(string $hostname, array $opts, Channel $channel = null)

Parameters

string $hostname hostname
array $opts channel options
Channel $channel (optional) re-use channel object

at line 42
CreateTopic(Topic $argument, array $metadata = [], array $options = [])

Creates the given topic with the given name.

Parameters

Topic $argument input argument
array $metadata metadata
array $options call options

at line 58
Publish(PublishRequest $argument, array $metadata = [], array $options = [])

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

Parameters

PublishRequest $argument input argument
array $metadata metadata
array $options call options

at line 72
GetTopic(GetTopicRequest $argument, array $metadata = [], array $options = [])

Gets the configuration of a topic.

Parameters

GetTopicRequest $argument input argument
array $metadata metadata
array $options call options

at line 86
ListTopics(ListTopicsRequest $argument, array $metadata = [], array $options = [])

Lists matching topics.

Parameters

ListTopicsRequest $argument input argument
array $metadata metadata
array $options call options

at line 100
ListTopicSubscriptions(ListTopicSubscriptionsRequest $argument, array $metadata = [], array $options = [])

Lists the name of the subscriptions for this topic.

Parameters

ListTopicSubscriptionsRequest $argument input argument
array $metadata metadata
array $options call options

at line 118
DeleteTopic(DeleteTopicRequest $argument, array $metadata = [], array $options = [])

Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_.

Parameters

DeleteTopicRequest $argument input argument
array $metadata metadata
array $options call options