Question

We have a custom camel processor which needs to be invoked and also parametrized dynamically from the incoming request payload xpath, but the URI of the processor contains 'COMMA' as it makes SQL query internally

<context id="mycontext">
   <from uri="timer://com.arpit.timer?period=1000&amp;delay=1000&amp;repeatCount=5&amp;fixedRate=false&amp;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>

Now the scenario works only when we give delimiter="%" otherwise, it fails with error about not able to find end point col2.

Is there a way to suppress delimiter in RECIPIENT LIST?

Regards, Arpit.

Était-ce utile?

La solution

No you cannot suppress the delimiter. Though you can set it to a value which wont match, eg such as XXXXXXXXXXX or whatever.

I logged a ticket to allow doing this in a future Camel release: https://issues.apache.org/jira/browse/CAMEL-6665

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top