Publish a message to a Google Pub/Sub topic.

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.

The Pub/Sub topic

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

The GCP service account to impersonate.

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 published messages.

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