Skip to content

Commit fb9f70b

Browse files
mehmetboraezertseaver
authored andcommitted
Subscription is returned from 'subscribe', not 'create_subscription' (#4402)
1 parent 79a782f commit fb9f70b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pubsub/README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ the topic, and subscribe to that.
9898
project_id=os.getenv('GOOGLE_CLOUD_PROJECT'),
9999
sub='MY_SUBSCRIPTION_NAME', # Set this to something appropriate.
100100
)
101-
subscription = subscriber.create_subscription(
101+
subscriber.create_subscription(
102102
name=subscription_name, topic=topic_name)
103+
subscription = subscriber.subscribe(subscription_name)
103104
104105
The subscription is opened asychronously, and messages are processed by
105106
use of a callback.

0 commit comments

Comments
 (0)