【发布时间】:2017-10-11 17:07:23
【问题描述】:
我在下面定义了一个 ARM 模板的片段,它创建了一个服务总线主题、订阅和规则/过滤器。该规则与主题和订阅一起应用,但过滤器的值为 1=1。为什么不应用表达式?
{
"apiVersion": "2017-04-01",
"name": "[concat(parameters('serviceBusNamespaceName'), '/TOPIC-NAME')]",
"type": "Microsoft.ServiceBus/namespaces/topics",
"location": "[variables('location')]",
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]"
],
"properties": {
"path": "TOPIC-NAME",
"duplicateDetectionHistoryTimeWindow": "00:10:00",
"enableBatchedOperations": false,
"enablePartitioning": true,
"enableSubscriptionPartitioning": false,
"filteringMessagesBeforePublishing": false,
"maxSizeInMegabytes": 5120
},
"resources": [
{
"apiVersion": "2017-04-01",
"name": "SUB-NAME",
"type": "subscriptions",
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'), '/topics/TOPIC-NAME')]"
],
"properties": {},
"resources": [
{
"apiVersion": "2017-04-01",
"name": "SUB-NAME",
"type": "Rules",
"dependsOn": [
"[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'), '/topics/TOPIC-NAME/subscriptions/SUB-NAME')]"
],
"properties": {
"filter": {
"sqlExpression": "MessageType = 'TYPE-OF-MESSAGE' AND MajorVersion = 1"
},
"action": {
"sqlExpression": "SET sys.Label='TYPE-OF-MESSAGE'"
}
}
}
]
}
]
}
【问题讨论】:
标签: azure azureservicebus