我们有一个自定义的camel处理器,需要从传入的请求有效负载xpath动态调用和参数化,但处理器的URI包含'COMMA',因为它在内部进行SQL查询
<context id="mycontext">
<from uri="timer://com.arpit.timer?period=1000&delay=1000&repeatCount=5&fixedRate=false&daemon=false"/>
<setBody>
<simple> "here goes sample XML payload "</simple>
</setBody>
<setheader headerName="val1">
<xpath resultType="java.lang.String"> "here goes my xpath" </xpath>
</setheader>
<!-- Now I call my custom processor with URI containing comma -->
<recipientList delimiter="%">
<simple>Select col1, col2, col3 from tablex where id = '${header.val1}'</simple>
</recipientList>
</context>
现在情况只有在我们提供 delimiter =“%”时才会起作用,否则会因为无法找到终点col2而失败。
有没有办法在RECIPIENT LIST中抑制分隔符?
此致 Arpit。
答案 0 :(得分:0)
不,你不能压制分隔符。虽然您可以将其设置为不匹配的值,例如XXXXXXXXXXX等等。
我记录了一张票,允许在未来的Camel版本中执行此操作:https://issues.apache.org/jira/browse/CAMEL-6665