
Cloud Pub/Sub API
Cloud Pub/Sub API
Google Cloud Pub/Sub API is a globally-scaled message queue — topic/subscription model, at-least-once delivery, millisecond latency, auto-scaling.
Global-scale — single topic supports cross-region publish/subscribe
No strict message ordering by default (Pub/Sub Lite provides it)
POST /v1/projects/{projectId}/topics to create a topic; POST /v1/projects/{projectId}/subscriptions to create a subscription. Publishers call publish; subscribers pull or receive via push endpoint.
Uptime · 30-day window
About this API
Pub/Sub is GCP's messaging middleware — comparable to AWS SNS+SQS combined or Kafka's managed version, with its own twist: fully serverless, global-scale topics (a message can publish/subscribe across continents), billed by message count and bytes. Design is "at-least-once" — messages are delivered but may be duplicated — so consumers must be idempotent. Pub/Sub is the glue in GCP data pipelines: a typical architecture is producer → Pub/Sub → Dataflow (processing) → BigQuery (storage), fully managed with no ops burden. Compared to Kafka, it lacks strict ordering and long-term replay capabilities, but ops is much simpler. GCP also offers Pub/Sub Lite, which provides Kafka-like strict ordering at the cost of global-scale.
What you can build
- 1Inter-microservice async communication
- 2Event bus (order creation → multiple downstream handlers)
- 3Data pipeline (Pub/Sub → Dataflow → BigQuery)
- 4Device telemetry upload
Strengths & limitations
Strengths
- Global-scale — single topic supports cross-region publish/subscribe
- At-least-once delivery guarantee
- Auto-scaling, no broker management
- Native integration with Dataflow / Functions / Cloud Run
Limitations
- No strict message ordering by default (Pub/Sub Lite provides it)
- Per-message size limit 10MB
- At-least-once delivery requires consumer-side idempotency
Example request
curl https://google.com/<endpoint>Getting started
POST /v1/projects/{projectId}/topics to create a topic; POST /v1/projects/{projectId}/subscriptions to create a subscription. Publishers call publish; subscribers pull or receive via push endpoint.
FAQ
How long are messages retained?+
Default 7 days, configurable up to 31 days. Unconsumed messages past retention are discarded.
How do I ensure message ordering?+
Pub/Sub provides ordering keys (ordered within a key), or use Pub/Sub Lite (strict ordering within partitions, Kafka-like).
Technical details
- Auth type
- unknown
- Pricing
- unknown
- Protocols
- REST, gRPC
- SDKs
- python, javascript, typescript, go, java, csharp, php, ruby
- Response time
- 46 ms
- Last health check
- 5/12/2026, 7:37:36 AM
More from Google
Google Workspace Admin SDK API programmatically manages Workspace organizations — users, groups, devices, domains, audit logs, organizational units.
Retrieve AdMob accounts, apps, ad units, ad sources, and generate mediation or network reports.
Work with AdSense Host accounts, ad clients, ad units, reports, and ad code generation from one API surface.
Programmatically manage Apigee organizations, API proxy deployments, attributes, certificates, and hybrid operations.
Google BigQuery API is the REST interface to GCP's flagship data warehouse — execute SQL queries, manage datasets/tables, stream inserts, and use built-in ML.
Control Binary Authorization attestors and policy checks for container images deployed to GKE and Anthos.
Fetch Business Profile location metrics, daily time series, and monthly search keyword impressions.
Google Calendar API lets apps create, read, and update calendar events programmatically — the go-to integration for scheduling apps.