QuickDevGuide

Home › GCP

Pub/Sub & Event-Driven Functions — GCP

Pub/Sub is a global, at-least-once messaging service: publishers send to a topic, each subscription gets a copy. Feature Notes Pull vs push subscriptions workers pull, or Pub/Sub pushes to an HTTPS endpoint (Cloud Run) Ack deadline redelivered if not acknowledged in time (extendable) Dead-letter topic after N failed deliveries Ordering keys ordered delivery per key (enable on the subscription) Exactly-once delivery optional on pull subscriptions Filters subscription-level attribute filters Eventarc routes events (Pub/Sub, Cloud Storage, audit logs) to Cloud Run; Cloud Run functions (formerly Cloud Functions) are the quickest way to write a handler. Messages arrive base64-encoded inside a CloudEvent — and may be duplicated, so handlers must be idempotent.

Key Takeaways