Service Bus topic should enable partitioning

Medium Azure General topics-service-bus-topic-enable-2

Applies to

  • Microsoft.ServiceBus/namespaces/topics

What CGPulse checks

A resource passes this rule when enablePartitioning must equal true. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Enable partitioning to improve throughput and availability. In Azure Portal: Service Bus > Topics > create topic with Partitioning enabled. See: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-partitioning

CLI

az servicebus topic create -g "{rg}" --namespace-name "<namespace-name>" -n "<topic-name>" --enable-partitioning true

Bicep

resource topic 'Microsoft.ServiceBus/namespaces/topics@2024-01-01' = {
  name: '<topic-name>'
  parent: serviceBusNamespace
  properties: {
    enablePartitioning: true
  }
}

Terraform

resource "azurerm_servicebus_topic" "{name}" {
  name                = "<topic-name>"
  namespace_id        = azurerm_servicebus_namespace.{name}.id
  enable_partitioning = true
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related Azure rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.