Skip to content
Permalink
Browse files
docs: fix get topic_path in subscriber sample (#210)
  • Loading branch information
ryanyuan committed Sep 28, 2020
1 parent 1193cd1 commit 7228f6c9a4c050bf22bb4bc3582b89b04eaa8702
Showing with 5 additions and 1 deletion.
  1. +5 −1 docs/subscriber/index.rst
@@ -36,8 +36,12 @@ to subscribe to, and it must already exist. Once you have that, it is easy:
# Substitute PROJECT, SUBSCRIPTION, and TOPIC with appropriate values for
# your application.
# from google.cloud import pubsub
# publisher = pubsub.PublisherClient()
topic_path = publisher.topic_path(PROJECT, TOPIC)
sub_path = subscriber.subscription_path(PROJECT, SUBSCRIPTION)
topic_path = subscriber.topic_path(PROJECT, TOPIC)
subscriber.create_subscription(request={"name": sub_path, "topic": topic_path})
Once you have created a subscription (or if you already had one), the next

0 comments on commit 7228f6c

Please sign in to comment.