【问题标题】:update duplicateDetectionHistoryTimeWindow for Service Bus Topic via ARM Template通过 ARM 模板更新 Service Bus 主题的 duplicateDetectionHistoryTimeWindow
【发布时间】:2021-03-04 22:30:57
【问题描述】:

如何通过 ARM 模板更新 Service Bus 主题的 duplicateDetectionHistoryTimeWindow 值?

这是我的 ARM 模板,将 duplicateDetectionHistoryTimeWindow 设置为 1 分钟,但部署失败:

"resources": [
        {
            "apiVersion": "2017-04-01",
            "name": "[concat(parameters('serviceBusName'), '/', parameters('topicName'))]",
            "type": "Microsoft.ServiceBus/namespaces/topics",
            "properties": {
                "path": "[parameters('topicName')]",
                "requiresDuplicateDetection": true,
                "defaultMessageTimeToLive": "P14D",
                "duplicateDetectionHistoryTimeWindow": "P01M"
            }
        }
    ]

【问题讨论】:

    标签: azure-resource-manager azure-servicebus-topics


    【解决方案1】:

    要将duplicateDetectionHistoryTimeWindow 设置为1 分钟,您需要使用PT1M 而不是P01M 指定它。

    只需使用下面的模板,它对我来说效果很好。

    "resources": [
            {
                "apiVersion": "2017-04-01",
                "name": "[concat(parameters('serviceBusName'), '/', parameters('topicName'))]",
                "type": "Microsoft.ServiceBus/namespaces/topics",
                "properties": {
                    "path": "[parameters('topicName')]",
                    "requiresDuplicateDetection": true,
                    "defaultMessageTimeToLive": "P14D",
                    "duplicateDetectionHistoryTimeWindow": "PT1M"
                }
            }
        ]
    

    【讨论】:

      猜你喜欢
      • 2021-09-09
      • 1970-01-01
      • 2020-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多