Hi
Yeah you should create an instance
from("activemq:myQueue").process(new MyProcessor());
On Thu, Sep 22, 2022 at 2:35 PM Michael Rambichler <[email protected]>
wrote:
> Hi all,
>
> just tried out to instantiate a CustomProcessor in a route (like it is
> documented)
> But this does not work.
> Error: Cannot resolve method 'process(Class<MyProcessor>)'
>
> Should we remove this from documentation?
> USING A PROCESSOR IN A ROUTE
>
> Once you have written a class which implements processor like this:
>
> public class MyProcessor implements Processor {
>
> public void process(Exchange exchange) throws Exception {
> // do something...
> }
>
> }
>
> Then you can easily call this processor from a Java such as:
>
> from("activemq:myQueue").process(MyProcessor.class);
>
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2