Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ServiceBus] Fix sb perf test #29765

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions sdk/servicebus/perf-resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ param baseName string = resourceGroup().name
param location string = resourceGroup().location

var serviceBusNamespaceName = 'sb-${baseName}'
var serviceBusQueueName = 'sb-${baseName}-queue'
var serviceBusTopicName = 'sb-${baseName}-topic'
var serviceBusSubscriptionName = 'sb-${baseName}-subscription'
var serviceBusQueueName = '${serviceBusNamespaceName}-queue'
var serviceBusTopicName = '${serviceBusNamespaceName}-topic'
var serviceBusSubscriptionName = '${serviceBusNamespaceName}-subscription'
var defaultSASKeyName = 'RootManageSharedAccessKey'
var authRuleResourceId = resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', serviceBusNamespaceName, defaultSASKeyName)
var sbVersion = '2017-04-01'


Expand All @@ -21,10 +20,11 @@ resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2017-04-01' = {
}

resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2017-04-01' = {
name: '${serviceBusNamespaceName}/${serviceBusQueueName}'
parent: serviceBusNamespace
name: serviceBusQueueName
properties: {
lockDuration: 'PT5M'
maxSizeInMegabytes: 4096
maxSizeInMegabytes: 1024
requiresDuplicateDetection: false
requiresSession: false
defaultMessageTimeToLive: 'P10675199DT2H48M5.4775807S'
Expand All @@ -35,40 +35,34 @@ resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2017-04-01' = {
enablePartitioning: false
enableExpress: false
}
dependsOn: [
serviceBusNamespace
]
}

resource serviceBusTopic 'Microsoft.ServiceBus/namespaces/topics@2017-04-01' = {
name: '${serviceBusNamespaceName}/${serviceBusTopicName}'
parent: serviceBusNamespace
name: serviceBusTopicName
properties: {
autoDeleteOnIdle: 'P10675199DT2H48M5.4775807S'
defaultMessageTimeToLive: 'P10675199DT2H48M5.4775807S'
duplicateDetectionHistoryTimeWindow: 'PT10M'
enableBatchedOperations: true
enableExpress: false
enablePartitioning: false
maxSizeInMegabytes: 4096
maxSizeInMegabytes: 1024
requiresDuplicateDetection: false
status: 'Active'
supportOrdering: true
}
dependsOn: [
serviceBusNamespace
]
}

resource serviceBusNamespace_serviceBusTopicName_serviceBusSubscriptionName 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2017-04-01' = {
name: '${serviceBusNamespaceName}/${serviceBusTopicName}/${serviceBusSubscriptionName}'
resource serviceBusSubscription 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2017-04-01' = {
parent: serviceBusTopic
name: serviceBusSubscriptionName
properties: {
}
dependsOn: [
serviceBusTopic
]
}


var authRuleResourceId = resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', serviceBusNamespace.name, defaultSASKeyName)
output AZURE_SERVICEBUS_CONNECTION_STRING string = listkeys(authRuleResourceId, sbVersion).primaryConnectionString
output AZURE_SERVICEBUS_QUEUE_NAME string = serviceBusQueue.name
output AZURE_TOPIC_QUEUE_NAME string = serviceBusTopic.name
output AZURE_SERVICEBUS_TOPIC_NAME string = serviceBusTopic.name
output AZURE_SERVICEBUS_SUBSCRIPTION_NAME string = serviceBusSubscription.name