Title: Pub/Sub subscriptions don't bind to the specified topic as stated in documentation · Issue #2341 · googleapis/google-cloud-python · GitHub
Open Graph Title: Pub/Sub subscriptions don't bind to the specified topic as stated in documentation · Issue #2341 · googleapis/google-cloud-python
X Title: Pub/Sub subscriptions don't bind to the specified topic as stated in documentation · Issue #2341 · googleapis/google-cloud-python
Description: Page Name: pubsub-topic Release: 0.18.1 Can a helper subscription method be added in the gcloud.pubsub.client.Client class to facilitate subscribing to subscriptions similar to how there's a topic method to facilitate creating topics. Cu...
Open Graph Description: Page Name: pubsub-topic Release: 0.18.1 Can a helper subscription method be added in the gcloud.pubsub.client.Client class to facilitate subscribing to subscriptions similar to how there's a topic ...
X Description: Page Name: pubsub-topic Release: 0.18.1 Can a helper subscription method be added in the gcloud.pubsub.client.Client class to facilitate subscribing to subscriptions similar to how there's a to...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/2341
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pub/Sub subscriptions don't bind to the specified topic as stated in documentation","articleBody":"Page Name: pubsub-topic\nRelease: 0.18.1\n\nCan a helper `subscription` method be added in the `gcloud.pubsub.client.Client` class to facilitate subscribing to subscriptions similar to how there's a `topic` method to facilitate creating topics. Current [instructions](https://cloud.google.com/pubsub/docs/subscriber#receiving-pull-messages) for receiving pull messages suggest invoking the `gcloud.pubsub.topic.Topic.subscription` method which creates a subscription bound to the specified topic as follows:\n\n```\npubsub_client = pubsub.Client()\ntopic = pubsub_client.topic(topic_name)\nsubscription = topic.subscription(subscription_name)\n\nresults = subscription.pull(return_immediately=True)\n```\n\nHowever a non-existent topic name can be supplied for `topic_name` and messages can still be received from the `results`.\n\nThe following code also works without having to specify a topic:\n\n```\npubsub_client = pubsub.Client()\nsubscription = pubsub.subscription.Subscription(subscription_name, client=pubsub_client)\n```\n\nThe `gcloud.pubsub.topic.Topic.subscription` documentation stating _\"Creates a subscription bound to the current topic\"_ is misleading because it seems it binds to all topics.\n","author":{"url":"https://github.com/georgegiovanni","@type":"Person","name":"georgegiovanni"},"datePublished":"2016-09-17T19:03:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2341/google-cloud-python/issues/2341"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5e757468-137d-5227-22f6-3e1afad800b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E25E:3A3FB7:627B33:84CE28:6A4D3FA2 |
| html-safe-nonce | a8dcee0bf67bf116c6224b8fc3f648d9079aa6ff085b04680010fcdfd4e9ec1b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjVFOjNBM0ZCNzo2MjdCMzM6ODRDRTI4OjZBNEQzRkEyIiwidmlzaXRvcl9pZCI6Ijg5MDgzODkxNjU4OTgyMTk0MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 853fa8c0f3c41e1bb994f8241143f40176e9bdf43666727da40ddbca01f476de |
| hovercard-subject-tag | issue:177599649 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/2341/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5de7ea1d735accbf8ff1d039b6d84e1ab168ae45b5f05795e27c416369006503/googleapis/google-cloud-python/issues/2341 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5de7ea1d735accbf8ff1d039b6d84e1ab168ae45b5f05795e27c416369006503/googleapis/google-cloud-python/issues/2341 |
| og:image:alt | Page Name: pubsub-topic Release: 0.18.1 Can a helper subscription method be added in the gcloud.pubsub.client.Client class to facilitate subscribing to subscriptions similar to how there's a topic ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | georgegiovanni |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width