Class Publisher.PublisherBase

[BindServiceMethod(typeof(Publisher), "BindService")]
public abstract class PublisherBase

Base class for server-side implementations of Publisher

Inheritance

Object > Publisher.PublisherBase

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Methods

CreateTopic(Topic, ServerCallContext)

public virtual Task<Topic> CreateTopic(Topic request, ServerCallContext context)

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

Parameters
TypeNameDescription
Topicrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Topic>

The response to send back to the client (wrapped by a task).

DeleteTopic(DeleteTopicRequest, ServerCallContext)

public virtual Task<Empty> DeleteTopic(DeleteTopicRequest request, ServerCallContext context)

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
TypeNameDescription
DeleteTopicRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Empty>

The response to send back to the client (wrapped by a task).

DetachSubscription(DetachSubscriptionRequest, ServerCallContext)

public virtual Task<DetachSubscriptionResponse> DetachSubscription(DetachSubscriptionRequest request, ServerCallContext context)

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
TypeNameDescription
DetachSubscriptionRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<DetachSubscriptionResponse>

The response to send back to the client (wrapped by a task).

GetTopic(GetTopicRequest, ServerCallContext)

public virtual Task<Topic> GetTopic(GetTopicRequest request, ServerCallContext context)

Gets the configuration of a topic.

Parameters
TypeNameDescription
GetTopicRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Topic>

The response to send back to the client (wrapped by a task).

ListTopics(ListTopicsRequest, ServerCallContext)

public virtual Task<ListTopicsResponse> ListTopics(ListTopicsRequest request, ServerCallContext context)

Lists matching topics.

Parameters
TypeNameDescription
ListTopicsRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListTopicsResponse>

The response to send back to the client (wrapped by a task).

ListTopicSnapshots(ListTopicSnapshotsRequest, ServerCallContext)

public virtual Task<ListTopicSnapshotsResponse> ListTopicSnapshots(ListTopicSnapshotsRequest request, ServerCallContext context)

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
TypeNameDescription
ListTopicSnapshotsRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListTopicSnapshotsResponse>

The response to send back to the client (wrapped by a task).

ListTopicSubscriptions(ListTopicSubscriptionsRequest, ServerCallContext)

public virtual Task<ListTopicSubscriptionsResponse> ListTopicSubscriptions(ListTopicSubscriptionsRequest request, ServerCallContext context)

Lists the names of the attached subscriptions on this topic.

Parameters
TypeNameDescription
ListTopicSubscriptionsRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListTopicSubscriptionsResponse>

The response to send back to the client (wrapped by a task).

Publish(PublishRequest, ServerCallContext)

public virtual Task<PublishResponse> Publish(PublishRequest request, ServerCallContext context)

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

Parameters
TypeNameDescription
PublishRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<PublishResponse>

The response to send back to the client (wrapped by a task).

UpdateTopic(UpdateTopicRequest, ServerCallContext)

public virtual Task<Topic> UpdateTopic(UpdateTopicRequest request, ServerCallContext context)

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

Parameters
TypeNameDescription
UpdateTopicRequestrequest

The request received from the client.

ServerCallContextcontext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Topic>

The response to send back to the client (wrapped by a task).