Skip to main content
Version: edge

The gpubsub_consumer Connector

This connector allows consuming a Google PubSub queue.


The credentials must be provided in a JSON file. The path to the JSON file should be set as an environment variable called GOOGLE_APPLICATION_CREDENTIALS

define connector gsub from gpubsub_consumer
codec = "string",
config = {
"connect_timeout": 100000000, # optional - Connection timeout in nanoseconds, defaults to 1 second
"ack_deadline": 100000000, # optional - ACK deadline in nanoseconds, defaults to 10 seconds. PubSub will resend the message if it's not ACKed within this time
"subscription_id": "projects/my_project/subscriptions/test-subscription-a", # required - ID of the subscription to use
"endpoint": "" # optional - the endpoint for the PubSub API, defaults to


The connector will set the $pubsub_connector metadata variable, which is a dictionary of the messages metadata.

message_idstringThe ID of the message, as provided by PubSub
ordering_keystringThe ordering key of the message
publish_timeintegerThe time when the message was published (as nanoseconds since 1st January 1970 00:00:00 UTC
attributesrecord with string valuesThe attributes attached to the message

Payload structure

The raw payload will be passed as is to the codec