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_.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ePublisher.PublisherBase\u003c/code\u003e class is a base for server-side implementations of the Cloud Pub/Sub v1 API's Publisher and is part of the \u003ccode\u003eGoogle.Cloud.PubSub.V1\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Cloud.PubSub.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThis API provides a range of methods for managing topics, including \u003ccode\u003eCreateTopic\u003c/code\u003e, \u003ccode\u003eDeleteTopic\u003c/code\u003e, \u003ccode\u003eGetTopic\u003c/code\u003e, \u003ccode\u003eListTopics\u003c/code\u003e, \u003ccode\u003eUpdateTopic\u003c/code\u003e, \u003ccode\u003eListTopicSnapshots\u003c/code\u003e, \u003ccode\u003eListTopicSubscriptions\u003c/code\u003e, and \u003ccode\u003ePublish\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt also supports managing subscriptions by offering the \u003ccode\u003eDetachSubscription\u003c/code\u003e method to detach subscriptions from a topic.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003ePublisher.PublisherBase\u003c/code\u003e API is version 3.23.0, and the document provides a list of versions dating back to 2.3.0.\u003c/p\u003e\n"]]],[],null,["# Cloud Pub/Sub v1 API - Class Publisher.PublisherBase (3.27.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.0 (latest)](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.26.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.26.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.25.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.25.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.24.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.24.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.23.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.23.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.22.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.21.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.20.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.19.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.18.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.17.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.16.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.15.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.14.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.13.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.12.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.11.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.10.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.10.1/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.9.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.9.1/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.8.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.7.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.6.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.5.1/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.4.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.3.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.2.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.1.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.0.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.10.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.9.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.8.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.7.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.6.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.5.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.4.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.3.0/Google.Cloud.PubSub.V1.Publisher.PublisherBase) \n\n [BindServiceMethod(typeof(Publisher), \"BindService\")]\n public abstract class Publisher.PublisherBase\n\nReference documentation and code samples for the Cloud Pub/Sub v1 API class Publisher.PublisherBase.\n\nBase class for server-side implementations of Publisher \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Publisher.PublisherBase \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.PubSub.V1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.PubSub.V1.dll\n\nMethods\n-------\n\n### CreateTopic(Topic, ServerCallContext)\n\n public virtual Task\u003cTopic\u003e CreateTopic(Topic request, ServerCallContext context)\n\nCreates the given topic with the given name. See the [resource name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).\n\n### DeleteTopic(DeleteTopicRequest, ServerCallContext)\n\n public virtual Task\u003cEmpty\u003e DeleteTopic(DeleteTopicRequest request, ServerCallContext context)\n\nDeletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.\n\n### DetachSubscription(DetachSubscriptionRequest, ServerCallContext)\n\n public virtual Task\u003cDetachSubscriptionResponse\u003e DetachSubscription(DetachSubscriptionRequest request, ServerCallContext context)\n\nDetaches a subscription from this topic. All messages retained in the\nsubscription are dropped. Subsequent `Pull` and `StreamingPull` requests\nwill return FAILED_PRECONDITION. If the subscription is a push\nsubscription, pushes to the endpoint will stop.\n\n### GetTopic(GetTopicRequest, ServerCallContext)\n\n public virtual Task\u003cTopic\u003e GetTopic(GetTopicRequest request, ServerCallContext context)\n\nGets the configuration of a topic.\n\n### ListTopicSnapshots(ListTopicSnapshotsRequest, ServerCallContext)\n\n public virtual Task\u003cListTopicSnapshotsResponse\u003e ListTopicSnapshots(ListTopicSnapshotsRequest request, ServerCallContext context)\n\nLists the names of the snapshots on this topic. Snapshots are used in\n[Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,\nwhich allow you to manage message acknowledgments in bulk. That is, you can\nset the acknowledgment state of messages in an existing subscription to the\nstate captured by a snapshot.\n\n### ListTopicSubscriptions(ListTopicSubscriptionsRequest, ServerCallContext)\n\n public virtual Task\u003cListTopicSubscriptionsResponse\u003e ListTopicSubscriptions(ListTopicSubscriptionsRequest request, ServerCallContext context)\n\nLists the names of the attached subscriptions on this topic.\n\n### ListTopics(ListTopicsRequest, ServerCallContext)\n\n public virtual Task\u003cListTopicsResponse\u003e ListTopics(ListTopicsRequest request, ServerCallContext context)\n\nLists matching topics.\n\n### Publish(PublishRequest, ServerCallContext)\n\n public virtual Task\u003cPublishResponse\u003e Publish(PublishRequest request, ServerCallContext context)\n\nAdds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist.\n\n### UpdateTopic(UpdateTopicRequest, ServerCallContext)\n\n public virtual Task\u003cTopic\u003e UpdateTopic(UpdateTopicRequest request, ServerCallContext context)\n\nUpdates an existing topic by updating the fields specified in the update\nmask. Note that certain properties of a topic are not modifiable."]]