Skip to content

load_google_cloud_pubsub

Subscribes to a Google Cloud Pub/Sub subscription and obtains bytes.

load_google_cloud_pubsub project_id=string, subscription_id=string, [timeout=duration]

The operator acquires raw bytes from a Google Cloud Pub/Sub subscription.

The project to connect to. Note that this is the project id, not the display name.

The subscription to subscribe to.

How long to wait for messages before ending the connection. A duration of zero means the operator will run forever.

The default value is 0s.

The load_google_cloud_pubsub operator can also be used from the from operator. For this, the gcps:// scheme can be used. The URI is then translated:

from "gcps://my_project/my_subscription"
load_google_cloud_pubsub project_id="my_project", subscription_id="my_subscription"

Subscribe to my-subscription in the project amazing-project-123456 and parse the messages as JSON:

load_google_cloud_pubsub project_id="amazing-project-123456", subscription_id="my-subscription"
read_json

save_google_cloud_pubsub