apache-camel - Camel -Hystrix-EIP : Is it possible to dynamically select onFallback or onFallbackViaNetwork based on content body in exchange?

标签 apache-camel hystrix

现有路线:

from("direct:test").id(id+"direct:test")
.hystrix()
.id("testHystrix").hystrixConfiguration().corePoolSize(corePoolSize)
.end()
.process(requestProcessor)
.to(endPoint)
.onFallbackViaNetwork()
.toD("${headers.fallbackEndPoint}")
.endHystrix();

是否可以根据交换的主体动态选择回退逻辑 onFallback() 或 onFallbackViaNetwork()。

最佳答案

没有,但是你可以有 2 个路由,每个路由都有一个,然后根据消息正文内容路由到适当的路由。

关于apache-camel - Camel -Hystrix-EIP : Is it possible to dynamically select onFallback or onFallbackViaNetwork based on content body in exchange?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51607272/

相关文章:

netflix-eureka - 微服务架构——netflix技术栈

java - Hystrix - 如何注册ExceptionMapper

spring-boot - Spring Boot + Eureka Server + Hystrix with Turbine : empty turbine. 流

java - setHeader() 如何在 Apache Camel 中工作

apache-camel - 在自定义 Camel 组件中使用 Apache Camel Simple

spring-boot - 指标未显示在/prometheus 端点上

java - 在运行时更新 Hystrix 配置

apache-camel - 更改编织语句的顺序时,CameladviceWith 的行为有所不同

apache-camel - Apache Camel ValueBuilder 不区分大小写

java - Camel 消耗队列中的消息但无法重新创建它