Skip to content

[Pub/Sub] Add a bare Subscriber factory to Client #3369

@kir-titievsky

Description

@kir-titievsky

Current Pub / Sub API requires a topic to create a subscription. This is unnecessary and cumbersome. It is also not feasible for some use cases: some users will only be given a subscription resource name to work with and not know the topic.

Current API:

from google.cloud import pubsub

client = pubsub.Client()
topic = client.topic(topic_name)
subscription = topic.subscription(sub_name)

Target:

subscription = client.subscription(sub_name)

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions