Microsoft.ServiceBus namespaces/topics
The namespaces/topics resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
To create a Microsoft.ServiceBus/namespaces/topics resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.ServiceBus/namespaces/topics@2024-01-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
autoDeleteOnIdle: 'string'
defaultMessageTimeToLive: 'string'
duplicateDetectionHistoryTimeWindow: 'string'
enableBatchedOperations: bool
enableExpress: bool
enablePartitioning: bool
maxMessageSizeInKilobytes: int
maxSizeInMegabytes: int
requiresDuplicateDetection: bool
status: 'string'
supportOrdering: bool
}
}
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 (required) |
parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: namespaces |
properties | Properties of topic resource. | SBTopicProperties |
Name | Description | Value |
---|---|---|
autoDeleteOnIdle | ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. | string |
defaultMessageTimeToLive | ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. | string |
duplicateDetectionHistoryTimeWindow | ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. | string |
enableBatchedOperations | Value that indicates whether server-side batched operations are enabled. | bool |
enableExpress | Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. | bool |
enablePartitioning | Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. | bool |
maxMessageSizeInKilobytes | Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. | int |
maxSizeInMegabytes | Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. | int |
requiresDuplicateDetection | Value indicating if this topic requires duplicate detection. | bool |
status | Enumerates the possible values for the status of a messaging entity. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
supportOrdering | Value that indicates whether the topic supports ordering. | bool |
The following quickstart samples deploy this resource type.
Bicep File | Description |
---|---|
Creates a Dapr microservices app using Container Apps | Create a Dapr microservices app using Container Apps. |
Creates a Dapr pub-sub servicebus app using Container Apps | Create a Dapr pub-sub servicebus app using Container Apps. |
The namespaces/topics resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
To create a Microsoft.ServiceBus/namespaces/topics resource, add the following JSON to your template.
{
"type": "Microsoft.ServiceBus/namespaces/topics",
"apiVersion": "2024-01-01",
"name": "string",
"properties": {
"autoDeleteOnIdle": "string",
"defaultMessageTimeToLive": "string",
"duplicateDetectionHistoryTimeWindow": "string",
"enableBatchedOperations": "bool",
"enableExpress": "bool",
"enablePartitioning": "bool",
"maxMessageSizeInKilobytes": "int",
"maxSizeInMegabytes": "int",
"requiresDuplicateDetection": "bool",
"status": "string",
"supportOrdering": "bool"
}
}
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2024-01-01' |
name | The resource name | string Constraints: Min length = 1 (required) |
properties | Properties of topic resource. | SBTopicProperties |
type | The resource type | 'Microsoft.ServiceBus/namespaces/topics' |
Name | Description | Value |
---|---|---|
autoDeleteOnIdle | ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. | string |
defaultMessageTimeToLive | ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. | string |
duplicateDetectionHistoryTimeWindow | ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. | string |
enableBatchedOperations | Value that indicates whether server-side batched operations are enabled. | bool |
enableExpress | Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. | bool |
enablePartitioning | Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. | bool |
maxMessageSizeInKilobytes | Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. | int |
maxSizeInMegabytes | Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. | int |
requiresDuplicateDetection | Value indicating if this topic requires duplicate detection. | bool |
status | Enumerates the possible values for the status of a messaging entity. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
supportOrdering | Value that indicates whether the topic supports ordering. | bool |
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Correlating messages over Logic Apps using Service Bus |
which shows how we can correlate messages over Logic Apps using Azure Service Bus |
Creates a Dapr microservices app using Container Apps |
Create a Dapr microservices app using Container Apps. |
Creates a Dapr pub-sub servicebus app using Container Apps |
Create a Dapr pub-sub servicebus app using Container Apps. |
Integration Patterns - Message Router - Service Bus |
Solution which shows how we can set up the Message Router pattern using a Service Bus Topic |
The namespaces/topics resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
To create a Microsoft.ServiceBus/namespaces/topics resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ServiceBus/namespaces/topics@2024-01-01"
name = "string"
body = jsonencode({
properties = {
autoDeleteOnIdle = "string"
defaultMessageTimeToLive = "string"
duplicateDetectionHistoryTimeWindow = "string"
enableBatchedOperations = bool
enableExpress = bool
enablePartitioning = bool
maxMessageSizeInKilobytes = int
maxSizeInMegabytes = int
requiresDuplicateDetection = bool
status = "string"
supportOrdering = bool
}
})
}
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: namespaces |
properties | Properties of topic resource. | SBTopicProperties |
type | The resource type | "Microsoft.ServiceBus/namespaces/topics@2024-01-01" |
Name | Description | Value |
---|---|---|
autoDeleteOnIdle | ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. | string |
defaultMessageTimeToLive | ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. | string |
duplicateDetectionHistoryTimeWindow | ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. | string |
enableBatchedOperations | Value that indicates whether server-side batched operations are enabled. | bool |
enableExpress | Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. | bool |
enablePartitioning | Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. | bool |
maxMessageSizeInKilobytes | Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. | int |
maxSizeInMegabytes | Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. | int |
requiresDuplicateDetection | Value indicating if this topic requires duplicate detection. | bool |
status | Enumerates the possible values for the status of a messaging entity. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
supportOrdering | Value that indicates whether the topic supports ordering. | bool |