第 151 章 Hystrix 组件

作为 Camel 2.18 版提供

hystrix 组件集成 Camel 路由中的 Netflix Hystrix 断路器。

详情请查看 Hystrix EIP 文档。

Maven 用户需要将以下依赖项添加到其 pom.xml 中:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-hystrix</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

151.1. Spring Boot Auto-Configuration

组件支持 3 个选项,它们如下所列。

名称描述默认类型

camel.component.hystrix.mapping.enabled

启用 Hystrics 指标 servlet 到 Spring web 上下文的自动映射。

true

布尔值

camel.component.hystrix.mapping.path

hystrix 指标 servlet 的端点。

/hystrix.stream

字符串

camel.component.hystrix.mapping.servlet-name

Hystrix 指标 servlet 的名称。

HystrixEventStreamServlet

字符串