Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Source: Google Cloud Pub/Sub

The Pub/Sub source subscribes to a Google Cloud Pub/Sub subscription and delivers messages into a pg_tide inbox.

Configuration

SELECT tide.relay_set_inbox(
    'events-from-pubsub',
    'incoming_events',
    '{
        "source_type": "pubsub",
        "project_id": "${env:GCP_PROJECT_ID}",
        "subscription": "pg-tide-sub",
        "credentials_json": "${file:/etc/gcp/sa.json}",
        "batch_size": 100
    }'::jsonb
);

Configuration Reference

ParameterTypeDefaultDescription
source_typestringMust be "pubsub"
project_idstringGCP project ID
subscriptionstringPub/Sub subscription name
credentials_jsonstringnullService account JSON
batch_sizeint100Messages per pull
ack_deadline_secsint30Acknowledgment deadline

Delivery Guarantees

Messages are acknowledged only after inbox insertion. The inbox deduplicates using the Pub/Sub message ID. Unacknowledged messages are redelivered after the ack deadline expires.

Further Reading