diff --git a/pubsub/cloud-client/subscriber.py b/pubsub/cloud-client/subscriber.py index 181e8235b219..dbaa396cddd5 100644 --- a/pubsub/cloud-client/subscriber.py +++ b/pubsub/cloud-client/subscriber.py @@ -198,6 +198,7 @@ def callback(message): def receive_messages_with_custom_attributes(project_id, subscription_name): """Receives messages from a pull subscription.""" # [START pubsub_subscriber_sync_pull_custom_attributes] + # [START pubsub_subscriber_async_pull_custom_attributes] import time from google.cloud import pubsub_v1 @@ -225,6 +226,7 @@ def callback(message): print('Listening for messages on {}'.format(subscription_path)) while True: time.sleep(60) + # [END pubsub_subscriber_async_pull_custom_attributes] # [END pubsub_subscriber_sync_pull_custom_attributes]