Reputation: 150
I'm using an ARM template to deploy to Azure. However the Azure Service Bus deployment section is proving difficult.
Can Anyone tell me how to configure the same settings as in the classic Portal, e.g.: duplicate Detection History Time Lock Duration Maximum Queue Size Maximum delivery count Default Message Time to Live
Alternatively is there a way to do it in Powershell and call that from the ARM script instead?
Upvotes: 2
Views: 872
Reputation: 29522
In fact you can. Problem is ServiceBus ARM Template is not well documented (for the moment).
Full template available here.
Interesting part:
"properties": {
"path": "[parameters('serviceBusQueueName')]",
"maxSizeInMegabytes": "2048",
"defaultMessageTimeToLive": "7.00:00:00",
"lockDuration": "00:01:00",
"enableDuplicateDetection": "true",
"duplicateDetectionHistoryTimeWindow": "00:15:00",
"enablePartitioning": "true",
"maxDeliveryCount": "5"
}
Here defaultMessageTimeToLive
, lockDuration
and duplicateDetectionHistoryTimeWindow
are Timespan
.
My tip when you don't know the name of the property:
Most of the time, it does the trick !
Upvotes: 2
Reputation: 1263
Currently these properties cannot be set using the ARM templates directly. You need to configure these using ServiceBus Powershell scripts.
Here is the link to sample PS scripts
https://code.msdn.microsoft.com/Service-Bus-PowerShell-a46b7059/sourcecode?fileId=134510&pathId=2004509049
Upvotes: 0