[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use InterceptSendToEndpoint from Java DSL

I need to replace my blueprint DSL with Java DSL. I want to intercept all attempts to send to certain queues, not just for one route, but for everything.
Here is the blueprint DSL:

    <camelContext xmlns="http://camel.apache.org/schema/blueprint";>

        <interceptSendToEndpoint uri="activemq:queue:.*-xxx"><to uri="direct:queued-Intercept"/></interceptSendToEndpoint>
        <interceptSendToEndpoint uri="activemq:queue:.*-xxx-dlq"><to uri="direct:queued-Intercept"/></interceptSendToEndpoint>
        <interceptSendToEndpoint uri="activemq:queue:.*-xxx-paused"><to uri="direct:queued-Intercept"/></interceptSendToEndpoint>

When I put calls to the interceptSendToEndpoint() method in a RouteBuilder configure method, they did not work.

The java documentation on the InterceptSendToEndpoint is poor. I have also found no good examples.

Douglas Jackson