
Google Cloud Publish
CertifiedPublish messages to Pub/Sub
Google Cloud Publish
Publish messages to Pub/Sub
Publishes one or more messages to a topic. Supports STRING/JSON serde and optional ordering keys.
type: io.kestra.plugin.gcp.pubsub.PublishExamples
id: gcp_pubsub_publish
namespace: company.team
tasks:
- id: publish
type: io.kestra.plugin.gcp.pubsub.Publish
topic: topic-test
from:
- data: "{{ 'base64-encoded-string-1' | base64encode }}"
attributes:
testAttribute: KestraTest
- messageId: '1234'
- orderingKey: 'foo'
- data: "{{ 'base64-encoded-string-2' | base64encode }}"
- attributes:
testAttribute: KestraTest
Properties
from *RequiredNon-dynamicstringarray
Structured data items, either as a map, a list of map, a URI, or a JSON string.
Structured data items can be defined in the following ways:
- A single item as a map (a document).
- A list of items as a list of maps (a list of documents).
- A URI, supported schemes are
kestrafor internal storage files,filefor host local files, andnsfilefor namespace files. - A JSON String that will then be serialized either as a single item or a list of items.
io.kestra.plugin.gcp.pubsub.model.Message
The message attributes map
The message data, must be a string if serde type is 'STRING', otherwise a JSON object
If it's a string, it can be a dynamic property otherwise not.
The message identifier
The message ordering key
topic *Requiredstring
Topic name
Pub/Sub topic ID (without project prefix)
impersonatedServiceAccount string
The GCP service account to impersonate
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serdeType string
STRINGSTRINGJSONSerde type
Serializer/deserializer for message payloads; defaults to STRING
serviceAccount string
The GCP service account
Outputs
messagesCount integer
Published message count
Metrics
records counter
recordsNumber of records published to the Pub/Sub topic.