【发布时间】:2011-10-13 09:49:57
【问题描述】:
你有这样的路线
<route id="route1">
<from uri="activemq:queuer1"/>
<choice>
<when>
<simple>${header.urn} regex '^user*'</simple>
<to uri="xslt:classpath:/xslt/rdf/user.xsl"/>
</when>
<when>
<simple>${header.urn} regex '^userdata:.*'</simple>
<to uri="xslt:classpath:/xslt/rdf/userdata.xsl"/>
</when>
....
<otherwise>
<setHeader headerName="errorMsg ">
<constant>no xsl file for this type</constant>
</setHeader>
<to uri="activemq:error"/>
</otherwise>
</choice>
<process ref="importer"/>
</route>
现在,如果路由进入 else 部分,则不应处理该消息。 如果消息进入,我可以以某种方式停止路由吗?
我可能会在所有 when 部分中添加流程部分并在最后删除它。 但我们已经有几个部分,还有更多即将推出。
其他解决方案将是首选。
【问题讨论】:
标签: apache-camel