apache-camel - 骆驼resilience4j断路器
问题描述
我想使用resilience4j 框架来实现容错。我已经为 resilence4j 使用了骆驼默认配置。该路由从 kafka 主题订阅消息并发送到 http 端点。
如果 http 端点关闭,它会尝试几次并进入 OPEN 状态。当 http 端点关闭时,它永远不会进入半开或关闭状态。如果我缺少任何东西,请帮助我。下面是我用于骆驼路线的代码片段。
from("kafka:{{ice.kafka.topics.goe.trades}}?brokers=localhost:9092&autoOffsetReset=
{{ice.kafka.auto.offset.reset}}&autoCommitEnable=true&allowManualCommit=false")
.log("Kafka input ${body}")
.circuitBreaker().inheritErrorHandler(true)
.resilience4jConfiguration()
.timeoutEnabled(true).timeoutDuration(50000).writableStackTraceEnabled(true).end()
.log("before Resilience ${threadName}").log("${headers}")
.toD("http://localhost:8083/student/allstudent?httpMethod=GET")
.log("After Resilience ${threadName}")
;
解决方案
推荐阅读
- ios - 以编程方式约束
- sql - 如何检索用户输入的特定合作伙伴 ID 的电子邮件并将其发送回控制器。
- javascript - 在选择框中选择选项时如何调用函数
- woocommerce - 在 Woocommerce 结帐中设置 billing_address_2 标签
- java - @version 与超类中的时间戳抛出错误
- image - 如何将图像地图坐标转换为 SVG 路径格式?
- php - 如何使用 SSH 在另一台服务器上的 PHP 中运行 CLI 命令?
- r - r 中 lme4 的交互作用图
- php - 发送带有空表单数据字段的 POST 请求
- .net - 如何从 .Net/C# 或 PowerShell 以编程方式调用或执行 azure cli 命令?