Skip to content

Instantly share code, notes, and snippets.

@paulyuk
Last active July 7, 2022 00:17
Show Gist options
  • Save paulyuk/2790dc5ddafdb5d90b6b34f4be1d8a93 to your computer and use it in GitHub Desktop.
Save paulyuk/2790dc5ddafdb5d90b6b34f4be1d8a93 to your computer and use it in GitHub Desktop.
Service Bus Topic and deadletter Bicep
param resourceToken string
param location string
param skuName string = 'Standard'
param topicName string = 'orders'
resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2018-01-01-preview' = {
name: 'sb-${resourceToken}'
location: location
sku: {
name: skuName
tier: skuName
}
resource topic 'topics@2022-01-01-preview' = {
name: topicName
properties: {
supportOrdering: true
}
resource subscription 'subscriptions@2022-01-01-preview' = {
name: topicName
properties: {
deadLetteringOnFilterEvaluationExceptions: true
deadLetteringOnMessageExpiration: true
maxDeliveryCount: 10
}
}
}
}
output SERVICEBUS_ENDPOINT string = serviceBusNamespace.properties.serviceBusEndpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment