# Azure Queue Storage vs Google Cloud Pub/Sub

Canonical: https://inetgeek.com/compare/azure-queue-storage-vs-google-pubsub/

Every value below is read from Azure Queue Storage's and Google Cloud Pub/Sub's own documentation. See https://inetgeek.com/methodology/ for how.

## At a glance

| Criterion | Azure Queue Storage | Google Cloud Pub/Sub |
| --- | --- | --- |
| Pricing model | Per 10,000 operations plus stored data, with the rate set by redundancy: LRS Class 1 operations are $0.004 per 10,000, ZRS and GRS cost more for the same call. There is no plan fee and no included allowance. | Three meters: throughput at $40 per TiB counting both publish and subscribe, storage at $0.27 per GiB-month for anything retained beyond a day, and data transfer when throughput crosses a zone or region boundary. Pub/Sub Lite is a separate product priced on reserved capacity rather than usage. |
| Included per month | None included — every operation is billed. Class 1 operations are $0.004 per 10,000 on LRS in East US, which is $0.40 per million, matching Amazon SQS's standard rate exactly. | 10 GiB of throughput free per billing account per calendar month, then $40 per TiB. Throughput counts bytes written to a topic plus bytes read from a subscription, so a message published once and read once is billed twice. BigQuery and Cloud Storage subscriptions are $50 per TiB and the 10 GiB does not apply to them; import topics run $50 or $80 per TiB by source. |
| Maximum message size | 64 KB per message. A queue may hold millions of messages, bounded only by the storage account's capacity rather than a queue-level ceiling. | Pub/Sub bills on bytes rather than message count; the pricing page states no per-message size ceiling and prices throughput and storage instead. |
| Message retention | Messages in the queue are billed as stored data at $0.045 per GB-month on LRS, rather than granted as a retention window. Azure charges for depth, not for time. | Retention is configurable and charged rather than granted: $0.27 per GiB-month for messages a topic is configured to retain, for snapshots, and for a subscription's backlog older than one day. A subscription's default retention is 7 days. |

## Where they differ

### Pricing model

- Azure Queue Storage: Per 10,000 operations plus stored data, with the rate set by redundancy: LRS Class 1 operations are $0.004 per 10,000, ZRS and GRS cost more for the same call. There is no plan fee and no included allowance. ([source](https://prices.azure.com/api/retail/prices))
- Google Cloud Pub/Sub: Three meters: throughput at $40 per TiB counting both publish and subscribe, storage at $0.27 per GiB-month for anything retained beyond a day, and data transfer when throughput crosses a zone or region boundary. Pub/Sub Lite is a separate product priced on reserved capacity rather than usage. ([source](https://cloud.google.com/pubsub/pricing))

### Included per month

- Azure Queue Storage: None included — every operation is billed. Class 1 operations are $0.004 per 10,000 on LRS in East US, which is $0.40 per million, matching Amazon SQS's standard rate exactly. ([source](https://prices.azure.com/api/retail/prices))
- Google Cloud Pub/Sub: 10 GiB of throughput free per billing account per calendar month, then $40 per TiB. Throughput counts bytes written to a topic plus bytes read from a subscription, so a message published once and read once is billed twice. BigQuery and Cloud Storage subscriptions are $50 per TiB and the 10 GiB does not apply to them; import topics run $50 or $80 per TiB by source. ([source](https://cloud.google.com/pubsub/pricing))

### Maximum message size

- Azure Queue Storage: 64 KB per message. A queue may hold millions of messages, bounded only by the storage account's capacity rather than a queue-level ceiling. ([source](https://learn.microsoft.com/en-us/azure/storage/queues/storage-queues-introduction))
- Google Cloud Pub/Sub: Pub/Sub bills on bytes rather than message count; the pricing page states no per-message size ceiling and prices throughput and storage instead. ([source](https://cloud.google.com/pubsub/pricing))

### Message retention

- Azure Queue Storage: Messages in the queue are billed as stored data at $0.045 per GB-month on LRS, rather than granted as a retention window. Azure charges for depth, not for time. ([source](https://prices.azure.com/api/retail/prices))
- Google Cloud Pub/Sub: Retention is configurable and charged rather than granted: $0.27 per GiB-month for messages a topic is configured to retain, for snapshots, and for a subscription's backlog older than one day. A subscription's default retention is 7 days. ([source](https://cloud.google.com/pubsub/pricing))

## Which should you choose?

Pick Azure Queue Storage if Azure-resident systems that want a queue billed like storage — operations plus depth, no plan to choose and no capacity to provision.

Pick Google Cloud Pub/Sub if Google Cloud systems that want messaging without capacity planning — throughput is metered rather than provisioned, and 10 GiB a month costs nothing.

Consider something else: Azure Queue Storage — Queued messages are billed as stored data, so a backlog costs money by the gigabyte-month, and there is no free allowance at all where SQS gives a million requests a month.

Consider something else: Google Cloud Pub/Sub — Throughput counts bytes both in and out, so a message read once is billed twice, and retention is a storage charge rather than an included window — the headline $40 per TiB is not the whole bill.

## Documented by only one

- Free tier: Google Cloud Pub/Sub: Yes
- Ingest price per GB: Google Cloud Pub/Sub: $40 per TiB, which is $0.039 per GiB, for standard publish and subscribe throughput in every Google Cloud region.
- Maximum delay: Azure Queue Storage: Time-to-live defaults to seven days and can be set to any positive number, or to -1 for a message that never expires — the only queue here with an unbounded option.

## Questions this comparison answers

**Should I choose Azure Queue Storage or Google Cloud Pub/Sub?**

Pick Azure Queue Storage if Azure-resident systems that want a queue billed like storage — operations plus depth, no plan to choose and no capacity to provision.
Pick Google Cloud Pub/Sub if Google Cloud systems that want messaging without capacity planning — throughput is metered rather than provisioned, and 10 GiB a month costs nothing.
