Apache Camel 和 Hystrix 命令名称
Apache Camel and Hystrix Command Name
我很高兴在最新的 Apache Camel 版本 2.18.0 中看到通过 DSL 支持 hystrix。我的问题是 - 现在如何命名 hystrix 命令?
假设我写 -
from("direct:start").hystrix().to("log:out")
Hystrix 仪表板将注册 "hystrix1" 命令并为其显示统计信息,这就是我想要更改的地方。
Apache Camel 的文档说 - "CommandKey - Used to identify the hystrix command. This option cannot be configured but is locked down to be the node id to make the command unique."。在他们的代码中,我看到他们使用路由的命名策略,因此它可能在某种程度上是可定制的,我只是不知道如何。
提前致谢!
我们让它使用节点 ID 作为命令名称。所以你可以试试
使用 id
设置节点 ID:
hystrix().id("myNameHere")
...
我很高兴在最新的 Apache Camel 版本 2.18.0 中看到通过 DSL 支持 hystrix。我的问题是 - 现在如何命名 hystrix 命令?
假设我写 -
from("direct:start").hystrix().to("log:out")
Hystrix 仪表板将注册 "hystrix1" 命令并为其显示统计信息,这就是我想要更改的地方。
Apache Camel 的文档说 - "CommandKey - Used to identify the hystrix command. This option cannot be configured but is locked down to be the node id to make the command unique."。在他们的代码中,我看到他们使用路由的命名策略,因此它可能在某种程度上是可定制的,我只是不知道如何。
提前致谢!
我们让它使用节点 ID 作为命令名称。所以你可以试试
使用 id
设置节点 ID:
hystrix().id("myNameHere")
...