Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Subscribes to a Google Cloud Pub/Sub subscription and yields events.

from_google_cloud_pubsub project_id=string, subscription_id=string, [metadata_field=field]

The operator emits one event per Pub/Sub message with a single field message containing the message payload as a string.

The project to connect to. This must be the project ID, not the display name.

The subscription to subscribe to.

When set, delivery metadata is attached at the given field path. Each event then also contains a record with this schema:

{
message_id: string, // Pub/Sub message ID
publish_time: time, // Message publish time
attributes: { // Record containing all attributes of the message
key: string ...
}
}
from_google_cloud_pubsub project_id="amazing-project-123456", subscription_id="my-subscription"
this = message.parse_json()
from_google_cloud_pubsub project_id="amazing-project-123456", subscription_id="my-subscription", metadata_field=metadata
{
message: "some text",
metadata: {
message_id: "0",
publish_time: 2025-12-12T17:05:07.324958101Z,
attributes: {},
}
}

Last updated: