GCP Pub/Sub cost: you pay per terabyte of message throughput
Pub/Sub bills about $40 per TiB of throughput (publish plus subscribe), with the first 10 GB free, plus storage for retained messages and egress. Throughput volume drives the bill, so batching and trimming payloads are the levers. Here is the breakdown.
Quick answer
Pub/Sub charges about $40 per TiB of message throughput, counting both publish and subscribe, with the first 10 GB per month free. Retained messages and snapshots add storage at about $0.27/GB-month, and cross-region delivery adds egress. Cost tracks throughput volume, so batch messages and trim payloads to keep it down.
Google Cloud Pub/Sub is a managed messaging service billed primarily on the volume of data that flows through it. Every published message and every delivery to a subscriber counts toward throughput, so a message consumed by several subscribers is billed for each delivery.
Throughput is the main line
Throughput is charged at about $40 per TiB, measured across publish and subscribe operations, with the first 10 GB per month free. Because subscribe counts too, fan-out matters: one message delivered to five subscriptions is five times the subscribe volume of one delivered to one.
Storage and egress
| Dimension | Rate (approximate) |
|---|---|
| Throughput (publish + subscribe) | ~$40 / TiB |
| Retained message / snapshot storage | ~$0.27 / GB-month |
| Cross-region delivery | Standard egress |
Message retention and snapshots for replay add storage cost, and delivering across regions adds network egress. Keeping publishers and subscribers in the same region avoids the egress line.
Reducing Pub/Sub cost
Because you pay per byte of throughput, batching messages reduces per-message overhead, and trimming payloads to the fields subscribers actually need cuts volume directly. Avoid unnecessary fan-out to subscriptions that ignore most messages, keep endpoints in-region, and set retention only as long as replay genuinely requires. The efficiency idea matches AWS messaging cost: fewer, leaner messages cost less.
FAQ
How is GCP Pub/Sub priced?
About $40 per TiB of message throughput, counting both publish and subscribe operations, with the first 10 GB per month free. Retained messages and snapshots add storage at about $0.27 per GB-month, and cross-region delivery adds egress.
Does Pub/Sub charge for each subscriber?
Effectively yes, through subscribe throughput. Delivery to each subscription counts toward throughput, so a message fanned out to five subscriptions is billed for five deliveries. High fan-out to subscriptions that ignore most messages is wasteful.
How do I reduce Pub/Sub cost?
Batch messages to reduce per-message overhead, trim payloads to the fields subscribers need, avoid unnecessary fan-out, keep publishers and subscribers in the same region to avoid egress, and set retention only as long as replay requires.
Does Pub/Sub message retention cost extra?
Yes. Retained messages and snapshots for replay are billed as storage at about $0.27 per GB-month. If you do not need replay, keep retention short so you are not paying to store messages you will never re-read.
Is Pub/Sub cheaper than self-managed Kafka?
It depends on scale and operational load. Pub/Sub removes the cost of running Kafka yourself but charges per TiB of throughput. For very high, steady volume a well-run Kafka cluster can be cheaper per byte; for variable or moderate volume the managed model often wins.
Does C3X estimate Pub/Sub cost?
Pub/Sub cost is driven by throughput volume, a usage input. C3X prices the surrounding GCP infrastructure, and you model publish and subscribe volume to estimate the per-TiB charge.
What to do next
Estimate the infrastructure around your messaging before you build it. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.