Skip to main content

gcp_pubsub

Consumes messages from a GCP Cloud Pub/Sub subscription.

# Config fields, showing default values
input:
label: ""
gcp_pubsub:
project: ""
subscription: ""
sync: false
max_outstanding_messages: 1000
max_outstanding_bytes: 1000000000

For information on how to set up credentials check out this guide.

Metadata​

This input adds the following metadata fields to each message:

- gcp_pubsub_publish_time_unix
- All message attributes

You can access these metadata fields using function interpolation.

Fields​

project​

The project ID of the target subscription.

Type: string
Default: ""

subscription​

The target subscription ID.

Type: string
Default: ""

sync​

Enable synchronous pull mode.

Type: bool
Default: false

max_outstanding_messages​

The maximum number of outstanding pending messages to be consumed at a given time.

Type: int
Default: 1000

max_outstanding_bytes​

The maximum number of outstanding pending messages to be consumed measured in bytes.

Type: int
Default: 1000000000