Google Cloud Publish

Google Cloud Publish

Certified

Publish messages to Pub/Sub

Publishes one or more messages to a topic. Supports STRING/JSON serde and optional ordering keys.

yaml
type: io.kestra.plugin.gcp.pubsub.Publish
yaml
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

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 kestra for internal storage files, file for host local files, and nsfile for namespace files.
  • A JSON String that will then be serialized either as a single item or a list of items.
Definitions
attributesobject

The message attributes map

dataobject

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.

messageIdstring

The message identifier

orderingKeystring

The message ordering key

Topic name

Pub/Sub topic ID (without project prefix)

The GCP service account to impersonate

Reference (ref) of the pluginDefaults to apply to this task.

The GCP project ID

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

The GCP scopes to be used

DefaultSTRING
Possible Values
STRINGJSON

Serde type

Serializer/deserializer for message payloads; defaults to STRING

The GCP service account

Published message count

Unitrecords

Number of records published to the Pub/Sub topic.