问题描述
我想使用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}")
;
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)