Događaj
31. ožu 23 - 2. tra 23
Najveći događaj učenja za Fabric, Power BI i SQL. 31. ožujka – 2. travnja. Upotrijebite kod FABINSIDER da uštedite 400 USD.
Registrirajte se već danasOvaj preglednik više nije podržan.
Prijeđite na Microsoft Edge, gdje vas čekaju najnovije značajke, sigurnosna ažuriranja i tehnička podrška.
Service Bus partitions enable queues and topics, or messaging entities, to be partitioned across multiple message brokers. Partitioning means that the overall throughput of a partitioned entity is no longer limited by the performance of a single message broker. In addition, a temporary outage of a message broker, for example during an upgrade, doesn't render a partitioned queue or topic unavailable. Partitioned queues and topics can contain all advanced Service Bus features, such as support for transactions and sessions. For more information, see Partitioned queues and topics. This article shows you different ways to enable duplicate message detection for a Service Bus queue or a topic.
Važno
When creating a queue in the Azure portal, select Enable partitioning as shown in the following image.
When creating a topic in the Azure portal, select Enable partitioning as shown in the following image.
To create a queue with partitioning enabled, use the az servicebus queue create
command with --enable-partitioning
set to true
.
az servicebus queue create \
--resource-group myresourcegroup \
--namespace-name mynamespace \
--name myqueue \
--enable-partitioning true
To create a topic with partitioning enabled, use the az servicebus topic create
command with --enable-partitioning
set to true
.
az servicebus topic create \
--resource-group myresourcegroup \
--namespace-name mynamespace \
--name mytopic \
--enable-partitioning true
To create a queue with partitioning enabled, use the New-AzServiceBusQueue
command with -EnablePartitioning
set to $True
.
New-AzServiceBusQueue -ResourceGroup myresourcegroup `
-NamespaceName mynamespace `
-QueueName myqueue `
-EnablePartitioning $True
To create a topic with partitioning enabled, use the New-AzServiceBusTopic
command with -EnablePartitioning
set to true
.
New-AzServiceBusTopic -ResourceGroup myresourcegroup `
-NamespaceName mynamespace `
-Name mytopic `
-EnablePartitioning $True
To create a queue with partitioning enabled, set enablePartitioning
to true
in the queue properties section. For more information, see Microsoft.ServiceBus namespaces/queues template reference.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serviceBusNamespaceName": {
"type": "string",
"metadata": {
"description": "Name of the Service Bus namespace"
}
},
"serviceBusQueueName": {
"type": "string",
"metadata": {
"description": "Name of the Queue"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"resources": [
{
"type": "Microsoft.ServiceBus/namespaces",
"apiVersion": "2018-01-01-preview",
"name": "[parameters('serviceBusNamespaceName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard"
},
"properties": {},
"resources": [
{
"type": "Queues",
"apiVersion": "2017-04-01",
"name": "[parameters('serviceBusQueueName')]",
"dependsOn": [
"[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespaceName'))]"
],
"properties": {
"enablePartitioning": true
}
}
]
}
]
}
To create a topic with duplicate detection enabled, set enablePartitioning
to true
in the topic properties section. For more information, see Microsoft.ServiceBus namespaces/topics template reference.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"service_BusNamespace_Name": {
"type": "string",
"metadata": {
"description": "Name of the Service Bus namespace"
}
},
"serviceBusTopicName": {
"type": "string",
"metadata": {
"description": "Name of the Topic"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"resources": [
{
"apiVersion": "2018-01-01-preview",
"name": "[parameters('service_BusNamespace_Name')]",
"type": "Microsoft.ServiceBus/namespaces",
"location": "[parameters('location')]",
"sku": {
"name": "Standard"
},
"properties": {},
"resources": [
{
"apiVersion": "2017-04-01",
"name": "[parameters('serviceBusTopicName')]",
"type": "topics",
"dependsOn": [
"[resourceId('Microsoft.ServiceBus/namespaces/', parameters('service_BusNamespace_Name'))]"
],
"properties": {
"enablePartitioning": true
}
}
]
}
]
}
Try the samples in the language of your choice to explore Azure Service Bus features.
Find samples for the older .NET and Java client libraries below:
On 30 September 2026, we'll retire the Azure Service Bus SDK libraries WindowsAzure.ServiceBus, Microsoft.Azure.ServiceBus, and com.microsoft.azure.servicebus, which don't conform to Azure SDK guidelines. We'll also end support of the SBMP protocol, so you'll no longer be able to use this protocol after 30 September 2026. Migrate to the latest Azure SDK libraries, which offer critical security updates and improved capabilities, before that date.
Although the older libraries can still be used beyond 30 September 2026, they'll no longer receive official support and updates from Microsoft. For more information, see the support retirement announcement.
Događaj
31. ožu 23 - 2. tra 23
Najveći događaj učenja za Fabric, Power BI i SQL. 31. ožujka – 2. travnja. Upotrijebite kod FABINSIDER da uštedite 400 USD.
Registrirajte se već danasObuka
Modul
Discover Azure message queues - Training
Learn how to integrate Azure Service Bus and Azure Queue storage in to your solution, and how to send and receive message by using .NET.
Dokumentacija
Enable partitioning in Azure Service Bus Premium namespaces - Azure Service Bus
This article explains how to enable partitioning in Azure Service Bus Premium namespaces by using Azure portal, PowerShell, CLI, and programming languages (C#, Java, Python, and JavaScript)
Create partitioned Azure Service Bus queues and topics - Azure Service Bus
Describes how to partition Service Bus queues and topics by using multiple message brokers.
Microsoft Azure Service Bus quotas and limits - Azure Service Bus
This article lists basic quotas and throttling thresholds in Azure Service Bus messaging. For example, maximum number of namespaces per subscription.