AzureAzure Service BusMessaging

azurerm_servicebus_subscription cost estimation

A Service Bus subscription is free to declare; its cost is billed on the parent namespace. Each subscription receives a copy of topic messages, and those deliveries are metered operations.

An azurerm_servicebus_subscription attaches to a Service Bus topic and receives a filtered copy of every message published to it, giving one logical consumer its own message stream. Declaring the subscription is free. Cost is billed on the parent azurerm_servicebus_namespace that owns the topic, under whatever tier the namespace runs.

The subscription is where topic fan-out turns into cost. On the Standard tier, each message delivered to a subscription and received by its consumer is a messaging operation billed per million on the namespace, so ten subscriptions on a topic can generate up to ten times the receive operations of a single consumer. The subscription's filter rules decide which messages it actually receives: a SQL or correlation filter that discards irrelevant messages before delivery reduces the metered operations, while a catch-all subscription receives everything. On Premium, deliveries consume the namespace's messaging-unit capacity rather than a per-operation charge. A subscription whose consumer is offline still accumulates messages, which occupy namespace capacity until drained or expired.

The optimization is filter tightly and drain reliably: scope each subscription's filter to only the messages it needs, keep consumers healthy so backlogs do not build, and remove subscriptions no consumer reads. c3x prices the parent namespace and its tier and treats the subscription declaration as free.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "azurerm_resource_group" "main" {
  name     = "messaging-rg"
  location = "eastus"
}

resource "azurerm_servicebus_namespace" "main" {
  name                = "app-sb-2026"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location
  sku                 = "Standard"
}

resource "azurerm_servicebus_topic" "events" {
  name         = "events"
  namespace_id = azurerm_servicebus_namespace.main.id
}

resource "azurerm_servicebus_subscription" "billing" {
  name               = "billing"
  topic_id           = azurerm_servicebus_topic.events.id
  max_delivery_count = 10
}

Pricing dimensions

What you actually pay for when you provision azurerm_servicebus_subscription.

DimensionUnitWhat's being charged
Subscription declarationfreeCreating the subscription has no charge; cost is billed on the parent namespace by its tier.
$0
Delivery operations (Standard)per million operationsEach message delivered to and received by the subscription is a messaging operation on the namespace.
~$0.80 per million operations (Standard)
Messaging-unit capacity (Premium)per hourOn Premium, subscription deliveries consume the namespace's hourly messaging-unit capacity rather than per-operation billing.

Optimization tips

Common ways to reduce azurerm_servicebus_subscription cost without changing the workload.

Scope subscription filters tightly

A SQL or correlation filter that drops irrelevant messages before delivery reduces the metered receive operations. A catch-all subscription pays to receive everything the topic publishes.

Keep consumers healthy to avoid backlogs

An offline consumer lets messages pile up in the subscription, occupying namespace capacity until drained or expired. Reliable consumers keep the backlog and its capacity use low.

Delete subscriptions no one reads

Each active subscription receives a copy of matching messages whether or not a consumer drains it. Removing unused subscriptions eliminates the deliveries they would generate.

FAQ

Does a Service Bus subscription cost money?

The subscription is free to declare. Cost is billed on the parent namespace: per-million delivery operations on Standard or messaging-unit capacity on Premium. Each subscription multiplies topic fan-out.

Why do more subscriptions increase cost?

Because each subscription receives its own copy of matching messages. On Standard, every delivery is a metered operation, so N subscriptions can generate up to N times the receive operations of one consumer.

How do subscription filters affect cost?

A tight filter discards messages the consumer does not need before delivery, cutting metered operations. A broad or catch-all filter delivers everything, so the subscription pays to receive it all.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including azurerm_servicebus_subscription.