1

I am trying to deploy a rule to an Azure Topic Subscription. The arm template deploys the rule "workday" without the $Default rule, however, the subscription never gets the message when I publish to the Topic. It only works when I add the $Default Rule.

I am using Cerebrata Cerulean. When I add the subscription via this tool and add the workday rule it automatically creates the $Default rule!!

enter image description here

This is my arm template. I cannot add a $Default Rule as it wont let me.

enter image description here

Jody
  • 323
  • 2
  • 11

1 Answers1

0

Create/Update of a $Default rule is not allowed.

Each newly created topic subscription has an initial default subscription rule. If you don't explicitly specify a filter condition for the rule, the applied filter is the true filter that enables all messages to be selected into the subscription. The default rule has no associated annotation action.

Use the ARM template to add sql filter, just the name is not $default.

"resources": [
     {
         "apiVersion": "2017-04-01",
         "name": "[concat(parameters('serviceBusTopicSubscriptionName'), '-filter')]",
         "type": "Rules",
         "dependsOn": [
             "[parameters('serviceBusTopicSubscriptionName')]"
         ],
         "properties": {
             "filter": {
                 "sqlExpression": "[parameters('serviceBusTopicSubscriptionSqlFilter')]"
                 }
            }
         }
]

The output is as below:

enter image description here

Joey Cai
  • 18,968
  • 1
  • 20
  • 30