【发布时间】:2018-10-25 05:34:14
【问题描述】:
apache Camel中的filter和choice有什么区别?
from("direct:a")
.choice()
.when(header("foo").isEqualTo("bar"))
.to("direct:b")
.when(header("foo").isEqualTo("cheese"))
.to("direct:c")
.otherwise()
.to("direct:d");
【问题讨论】:
-
简而言之,选择将根据给定条件路由交换,而过滤器从交换中删除某些元素camel.apache.org/content-based-router.htmlcamel.apache.org/message-filter.html
标签: jboss apache-camel enterprise-integration