DeliverySpec.Timeout 字段¶
标志名称: delivery-timeout
阶段: Beta,默认启用
跟踪问题: #5148
角色: 开发者
使用 delivery
规范配置事件传递参数时,可以使用 timeout
字段指定每个发送的 HTTP 请求的超时时间。timeout
参数的持续时间使用 ISO 8601 格式指定。
以下示例显示了一个订阅,它重试发送事件 3 次,并且在每次重试时请求超时时间为 5 秒
apiVersion: messaging.knative.dev/v1
kind: Subscription
metadata:
name: example-subscription
namespace: example-namespace
spec:
subscriber:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: example-sink
delivery:
backoffDelay: PT2S
backoffPolicy: linear
retry: 3
timeout: PT5S
您可以为 Channel、Subscription、Broker、Trigger 和任何其他接受 delivery
字段的资源规范指定 delivery
规范。