Cloud Pub/Sub API logo

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.

Visit site ↗Health checked 9h ago
Use it when

Global-scale — single topic supports cross-region publish/subscribe

Watch for

No strict message ordering by default (Pub/Sub Lite provides it)

First check

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.

Auth
CORS
No
HTTPS
Yes
Signup
?
Latency
46 ms
Protocol
REST, gRPC
Pricing

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 46ms
01

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.

02

What you can build

  • 1Inter-microservice async communication
  • 2Event bus (order creation → multiple downstream handlers)
  • 3Data pipeline (Pub/Sub → Dataflow → BigQuery)
  • 4Device telemetry upload
03

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
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://google.com/<endpoint>
05

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.

06

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).

07

Technical details

CORS: NoHTTPS: YesSignup: ?Open source: No
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
08

Tags

09

More from Google