Trigger
Consume messages periodically from a Pub/Sub topic and create one execution per batch.
If you would like to consume each message from a Pub/Sub topic in real-time and create one execution per message, you can use the io.kestra.plugin.gcp.pubsub.RealtimeTrigger instead.
type: "io.kestra.plugin.gcp.pubsub.Trigger"
id: gcp_trigger
namespace: company.team
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Received: {{ trigger.data }}"
triggers:
- id: trigger
type: io.kestra.plugin.gcp.pubsub.Trigger
projectId: test-project-id
subscription: test-subscription
topic: test-topic
maxRecords: 10
YES
The Pub/Sub topic
The Pub/Sub topic. It must be created before executing the task.
YES
true
YES
The GCP service account to impersonate.
NO
60
duration
Interval between polling.
The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.
YES
duration
Max duration in the Duration ISO format, after that the task will end.
YES
YES
The GCP project ID.
YES
["https://www.googleapis.com/auth/cloud-platform"]
The GCP scopes to be used.
YES
STRING
STRING
JSON
The serializer/deserializer to use.
YES
The GCP service account.
NO
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
List of execution states after which a trigger should be stopped (a.k.a. disabled).
YES
The Pub/Sub subscription
The Pub/Sub subscription. It will be created automatically if it didn't exist and 'autoCreateSubscription' is enabled.
Number of consumed rows.
uri
File URI containing consumed messages.