Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: fix get topic_path in subscriber sample (#210)
  • Loading branch information
ryanyuan committed Sep 28, 2020
1 parent 1193cd1 commit 7228f6c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/subscriber/index.rst
Expand Up @@ -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
Expand Down

0 comments on commit 7228f6c

Please sign in to comment.