Consume messages from a Google Pub/Sub topic.

Requires a maxDuration or a maxRecords.

yaml
type: "io.kestra.plugin.gcp.pubsub.Consume"
yaml
id: gcp_pubsub_consume
namespace: company.team

tasks:
  - id: consume
    type: io.kestra.plugin.gcp.pubsub.Consume
    topic: topic-test
    maxRecords: 10
    projectId: {{ secret('GCP_PROJECT_ID') }}
    subscription: my-subscription
Properties

The Pub/Sub subscription.

The Pub/Sub subscription. It will be created automatically if it didn't exist and 'autoCreateSubscription' is enabled.

The Pub/Sub topic

The Pub/Sub topic. It must be created before executing the task.

Default true

Whether the Pub/Sub subscription should be created if not exists.

The GCP service account to impersonate.

Format duration

Max duration in the Duration ISO format, after that the task will end.

Max number of records, when reached the task will end.

The GCP project ID.

SubType string
Default ["https://www.googleapis.com/auth/cloud-platform"]

The GCP scopes to be used.

Default STRING
Possible Values
STRINGJSON

The serializer/deserializer to use.

The GCP service account.

Number of consumed rows.

Format uri

File URI containing consumed messages.