Liveness 存活探针

Liveness 存活探针

扩展说明

拓展应用存活的检测点。

扩展接口

org.apache.dubbo.qos.probe.LivenessProbe

扩展配置

Dubbo QOS live 命令自动发现

已知扩展

暂无默认实现

扩展示例

Maven 项目结构:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxLivenessProbe.java (实现LivenessProbe接口)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.qos.probe.LivenessProbe (纯文本文件,内容为:xxx=com.xxx.XxxLivenessProbe)

XxxLivenessProbe.java:

  1. package com.xxx;
  2. public class XxxLivenessProbe implements LivenessProbe {
  3. public boolean check() {
  4. // ...
  5. }
  6. }

META-INF/dubbo/org.apache.dubbo.qos.probe.LivenessProbe:

  1. xxx=com.xxx.XxxLivenessProbe

最后修改 March 2, 2023: Fix alias forward in docs3-v2 (#2342) (f16c1535592)