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.
Namespace
Google.Cloud.PubSub.V1Assembly
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 | |
---|---|
Name | Description |
grpcClient |
PublisherPublisherClient The underlying gRPC client. |
settings |
PublisherServiceApiSettings The base PublisherServiceApiSettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override Publisher.PublisherClient GrpcClient { get; }
The underlying gRPC PublisherServiceApi client
Property Value | |
---|---|
Type | Description |
PublisherPublisherClient |
IAMPolicyClient
public override IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
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 | |
---|---|
Name | Description |
request |
Topic The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Topic |
The RPC response. |
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 | |
---|---|
Name | Description |
request |
Topic The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTopic |
A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request |
DeleteTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
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 | |
---|---|
Name | Description |
request |
DeleteTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request |
DetachSubscriptionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DetachSubscriptionResponse |
The RPC response. |
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 | |
---|---|
Name | Description |
request |
DetachSubscriptionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDetachSubscriptionResponse |
A Task containing the RPC response. |
GetTopic(GetTopicRequest, CallSettings)
public override Topic GetTopic(GetTopicRequest request, CallSettings callSettings = null)
Gets the configuration of a topic.
Parameters | |
---|---|
Name | Description |
request |
GetTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Topic |
The RPC response. |
GetTopicAsync(GetTopicRequest, CallSettings)
public override Task<Topic> GetTopicAsync(GetTopicRequest request, CallSettings callSettings = null)
Gets the configuration of a topic.
Parameters | |
---|---|
Name | Description |
request |
GetTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTopic |
A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request |
ListTopicSnapshotsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTopicSnapshotsResponsestring |
A pageable sequence of string resources. |
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 | |
---|---|
Name | Description |
request |
ListTopicSnapshotsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTopicSnapshotsResponsestring |
A pageable asynchronous sequence of string resources. |
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 | |
---|---|
Name | Description |
request |
ListTopicSubscriptionsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTopicSubscriptionsResponsestring |
A pageable sequence of string resources. |
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 | |
---|---|
Name | Description |
request |
ListTopicSubscriptionsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTopicSubscriptionsResponsestring |
A pageable asynchronous sequence of string resources. |
ListTopics(ListTopicsRequest, CallSettings)
public override PagedEnumerable<ListTopicsResponse, Topic> ListTopics(ListTopicsRequest request, CallSettings callSettings = null)
Lists matching topics.
Parameters | |
---|---|
Name | Description |
request |
ListTopicsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTopicsResponseTopic |
A pageable sequence of Topic resources. |
ListTopicsAsync(ListTopicsRequest, CallSettings)
public override PagedAsyncEnumerable<ListTopicsResponse, Topic> ListTopicsAsync(ListTopicsRequest request, CallSettings callSettings = null)
Lists matching topics.
Parameters | |
---|---|
Name | Description |
request |
ListTopicsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTopicsResponseTopic |
A pageable asynchronous sequence of Topic resources. |
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 | |
---|---|
Name | Description |
request |
PublishRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PublishResponse |
The RPC response. |
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 | |
---|---|
Name | Description |
request |
PublishRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPublishResponse |
A Task containing the RPC response. |
UpdateTopic(UpdateTopicRequest, CallSettings)
public override Topic UpdateTopic(UpdateTopicRequest request, CallSettings callSettings = null)
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
Parameters | |
---|---|
Name | Description |
request |
UpdateTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Topic |
The RPC response. |
UpdateTopicAsync(UpdateTopicRequest, CallSettings)
public override Task<Topic> UpdateTopicAsync(UpdateTopicRequest request, CallSettings callSettings = null)
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
Parameters | |
---|---|
Name | Description |
request |
UpdateTopicRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTopic |
A Task containing the RPC response. |