You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure ServiceBus重试base-delay属性单位疑问:秒还是毫秒?

Azure Service Bus 重试配置 base-delay 单位说明

你的配置里base-delay: 2000的单位是毫秒,对应2秒。

原因很明确:Spring Boot 中所有Duration类型的配置属性,默认解析单位都是毫秒。Azure Spring Cloud 的 Service Bus 重试配置遵循这个通用规则,所以直接写数字时会被当作毫秒处理。

如果想避免歧义,也可以在数值后显式指定单位,比如:

retry:
  exponential:
    base-delay: 2s # 明确指定为2秒

你的原始配置示例:

cloud:
  azure:
    servicebus:
      entity-type: queue
      connection-string: XXXXXXXXX
      retry:
        exponential:
          base-delay: 2000

内容的提问来源于stack exchange,提问作者Mael GAILLARD

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 18:22:02