Sumeet Tiwari
Sumeet Tiwari

Reputation: 51

how to configure multiple filters to one end point

i one to apply multiple filters to same end point in apache camel. i have tried like this but it is not correct.

<camel:endpoint id="inputpath" uri="file:///${sourcefolder}/XYZ/?move=.success&amp;moveFailed=.Error;recursive=true&amp;filter=#ghFilter;filter=#myAntFilter" />

it seems it is not the proper way because i got the exception. Please suggest how to use multiple filters in the same endpoint.

Upvotes: 0

Views: 812

Answers (2)

Claus Ibsen
Claus Ibsen

Reputation: 55545

You cannot have multiple filters. Only one filter is supported. But you can just from your filter java code do multiple filtering yourself.

Upvotes: 0

Mobility
Mobility

Reputation: 3305

Not very confirmed with your demand, but I think multicast(http://camel.apache.org/multicast.html) can be helpful.

one example

    <route>
        <from uri="activemq:test123" />
        <multicast parallelProcessing="true">
            <filter>
                <method ref="camelBean" method="match1" />
                <to uri="activemq:QUEUE1" />
            </filter>
            <filter>
                <method ref="camelBean" method="match2" />
                <to uri="activemq:QUEUE2" />
            </filter>
    </route>

Upvotes: 1

Related Questions