Cloud Pub/Sub v1 API - Class PublisherServiceApiClientImpl (3.8.0)

public sealed class PublisherServiceApiClientImpl : PublisherServiceApiClient

Reference documentation and code samples for the Cloud Pub/Sub v1 API class PublisherServiceApiClientImpl.

PublisherServiceApi client wrapper implementation, for convenient use.

Inheritance

object > PublisherServiceApiClient > PublisherServiceApiClientImpl

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Remarks

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

Constructors

PublisherServiceApiClientImpl(PublisherClient, PublisherServiceApiSettings, ILogger)

public PublisherServiceApiClientImpl(Publisher.PublisherClient grpcClient, PublisherServiceApiSettings settings, ILogger logger)

Constructs a client wrapper for the PublisherServiceApi service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientPublisherPublisherClient

The underlying gRPC client.

settingsPublisherServiceApiSettings

The base PublisherServiceApiSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override Publisher.PublisherClient GrpcClient { get; }

The underlying gRPC PublisherServiceApi client

Property Value
TypeDescription
PublisherPublisherClient
Overrides

IAMPolicyClient

public override IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient
Overrides

Methods

CreateTopic(Topic, CallSettings)

public override Topic CreateTopic(Topic request, CallSettings callSettings = null)

Creates the given topic with the given name. See the resource name rules.

Parameters
NameDescription
requestTopic

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

CreateTopicAsync(Topic, CallSettings)

public override Task<Topic> CreateTopicAsync(Topic request, CallSettings callSettings = null)

Creates the given topic with the given name. See the resource name rules.

Parameters
NameDescription
requestTopic

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTopic

A Task containing the RPC response.

Overrides

DeleteTopic(DeleteTopicRequest, CallSettings)

public override void DeleteTopic(DeleteTopicRequest request, CallSettings callSettings = null)

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
NameDescription
requestDeleteTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteTopicAsync(DeleteTopicRequest, CallSettings)

public override Task DeleteTopicAsync(DeleteTopicRequest request, CallSettings callSettings = null)

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
NameDescription
requestDeleteTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

DetachSubscription(DetachSubscriptionRequest, CallSettings)

public override DetachSubscriptionResponse DetachSubscription(DetachSubscriptionRequest request, CallSettings callSettings = null)

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

Parameters
NameDescription
requestDetachSubscriptionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DetachSubscriptionResponse

The RPC response.

Overrides

DetachSubscriptionAsync(DetachSubscriptionRequest, CallSettings)

public override Task<DetachSubscriptionResponse> DetachSubscriptionAsync(DetachSubscriptionRequest request, CallSettings callSettings = null)

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

Parameters
NameDescription
requestDetachSubscriptionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDetachSubscriptionResponse

A Task containing the RPC response.

Overrides

GetTopic(GetTopicRequest, CallSettings)

public override Topic GetTopic(GetTopicRequest request, CallSettings callSettings = null)

Gets the configuration of a topic.

Parameters
NameDescription
requestGetTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

GetTopicAsync(GetTopicRequest, CallSettings)

public override Task<Topic> GetTopicAsync(GetTopicRequest request, CallSettings callSettings = null)

Gets the configuration of a topic.

Parameters
NameDescription
requestGetTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTopic

A Task containing the RPC response.

Overrides

ListTopicSnapshots(ListTopicSnapshotsRequest, CallSettings)

public override PagedEnumerable<ListTopicSnapshotsResponse, string> ListTopicSnapshots(ListTopicSnapshotsRequest request, CallSettings callSettings = null)

Lists the names of the snapshots on this topic. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

Parameters
NameDescription
requestListTopicSnapshotsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTopicSnapshotsResponsestring

A pageable sequence of string resources.

Overrides

ListTopicSnapshotsAsync(ListTopicSnapshotsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicSnapshotsResponse, string> ListTopicSnapshotsAsync(ListTopicSnapshotsRequest request, CallSettings callSettings = null)

Lists the names of the snapshots on this topic. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

Parameters
NameDescription
requestListTopicSnapshotsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTopicSnapshotsResponsestring

A pageable asynchronous sequence of string resources.

Overrides

ListTopicSubscriptions(ListTopicSubscriptionsRequest, CallSettings)

public override PagedEnumerable<ListTopicSubscriptionsResponse, string> ListTopicSubscriptions(ListTopicSubscriptionsRequest request, CallSettings callSettings = null)

Lists the names of the attached subscriptions on this topic.

Parameters
NameDescription
requestListTopicSubscriptionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTopicSubscriptionsResponsestring

A pageable sequence of string resources.

Overrides

ListTopicSubscriptionsAsync(ListTopicSubscriptionsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicSubscriptionsResponse, string> ListTopicSubscriptionsAsync(ListTopicSubscriptionsRequest request, CallSettings callSettings = null)

Lists the names of the attached subscriptions on this topic.

Parameters
NameDescription
requestListTopicSubscriptionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTopicSubscriptionsResponsestring

A pageable asynchronous sequence of string resources.

Overrides

ListTopics(ListTopicsRequest, CallSettings)

public override PagedEnumerable<ListTopicsResponse, Topic> ListTopics(ListTopicsRequest request, CallSettings callSettings = null)

Lists matching topics.

Parameters
NameDescription
requestListTopicsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTopicsResponseTopic

A pageable sequence of Topic resources.

Overrides

ListTopicsAsync(ListTopicsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicsResponse, Topic> ListTopicsAsync(ListTopicsRequest request, CallSettings callSettings = null)

Lists matching topics.

Parameters
NameDescription
requestListTopicsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTopicsResponseTopic

A pageable asynchronous sequence of Topic resources.

Overrides

Publish(PublishRequest, CallSettings)

public override PublishResponse Publish(PublishRequest request, CallSettings callSettings = null)

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

Parameters
NameDescription
requestPublishRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PublishResponse

The RPC response.

Overrides

PublishAsync(PublishRequest, CallSettings)

public override Task<PublishResponse> PublishAsync(PublishRequest request, CallSettings callSettings = null)

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

Parameters
NameDescription
requestPublishRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPublishResponse

A Task containing the RPC response.

Overrides

UpdateTopic(UpdateTopicRequest, CallSettings)

public override Topic UpdateTopic(UpdateTopicRequest request, CallSettings callSettings = null)

Updates an existing topic. Note that certain properties of a topic are not modifiable.

Parameters
NameDescription
requestUpdateTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

UpdateTopicAsync(UpdateTopicRequest, CallSettings)

public override Task<Topic> UpdateTopicAsync(UpdateTopicRequest request, CallSettings callSettings = null)

Updates an existing topic. Note that certain properties of a topic are not modifiable.

Parameters
NameDescription
requestUpdateTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTopic

A Task containing the RPC response.

Overrides