You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Holiday <da...@holitek.io> on 2021/01/22 14:14:32 UTC

Quick question about processors and DSL

Hello fellow camel riders!

Whenever I make a processor I have to access it i. DSL using "to()". When I
attempt to access it using "process()" i get an error message telling me
the class could not be found in the registry.

I did some experimentation and it seems as though I can use "process()" if
I supply a lambda. In my application I am supplying class names as
parameters to the DSL calls.

Is it the case that "process()" isn't ok with taking a classname and
instead requires a processor object supplied either by lambda or by there
being an object already present in the registry?

Thx!!

Re: Quick question about processors and DSL

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah or use .bean( xxx )


On Fri, Jan 22, 2021 at 3:43 PM David Holiday <da...@holitek.io>
wrote:

> Ok cool. So to be clear - if I want Camel to spin up an instance of a
> processor dynamically from a classname I have to use "to()" and not
> "process()".
>
> Ty!! 😊
>
> On Fri, Jan 22, 2021, 7:40 AM Claus Ibsen <cl...@gmail.com> wrote:
>
> > Yes that is correct.
> >
> > For FQN classnames and the required work to initailize and instance of
> > it (if needed) et all - is what the bean component is needed for
> >
> > The process is for basic java where it requires an object instance.
> >
> > On Fri, Jan 22, 2021 at 3:14 PM David Holiday <da...@holitek.io>
> > wrote:
> > >
> > > Hello fellow camel riders!
> > >
> > > Whenever I make a processor I have to access it i. DSL using "to()".
> > When I
> > > attempt to access it using "process()" i get an error message telling
> me
> > > the class could not be found in the registry.
> > >
> > > I did some experimentation and it seems as though I can use "process()"
> > if
> > > I supply a lambda. In my application I am supplying class names as
> > > parameters to the DSL calls.
> > >
> > > Is it the case that "process()" isn't ok with taking a classname and
> > > instead requires a processor object supplied either by lambda or by
> there
> > > being an object already present in the registry?
> > >
> > > Thx!!
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
> >
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Quick question about processors and DSL

Posted by David Holiday <da...@holitek.io>.
Ok cool. So to be clear - if I want Camel to spin up an instance of a
processor dynamically from a classname I have to use "to()" and not
"process()".

Ty!! 😊

On Fri, Jan 22, 2021, 7:40 AM Claus Ibsen <cl...@gmail.com> wrote:

> Yes that is correct.
>
> For FQN classnames and the required work to initailize and instance of
> it (if needed) et all - is what the bean component is needed for
>
> The process is for basic java where it requires an object instance.
>
> On Fri, Jan 22, 2021 at 3:14 PM David Holiday <da...@holitek.io>
> wrote:
> >
> > Hello fellow camel riders!
> >
> > Whenever I make a processor I have to access it i. DSL using "to()".
> When I
> > attempt to access it using "process()" i get an error message telling me
> > the class could not be found in the registry.
> >
> > I did some experimentation and it seems as though I can use "process()"
> if
> > I supply a lambda. In my application I am supplying class names as
> > parameters to the DSL calls.
> >
> > Is it the case that "process()" isn't ok with taking a classname and
> > instead requires a processor object supplied either by lambda or by there
> > being an object already present in the registry?
> >
> > Thx!!
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: Quick question about processors and DSL

Posted by Claus Ibsen <cl...@gmail.com>.
Yes that is correct.

For FQN classnames and the required work to initailize and instance of
it (if needed) et all - is what the bean component is needed for

The process is for basic java where it requires an object instance.

On Fri, Jan 22, 2021 at 3:14 PM David Holiday <da...@holitek.io> wrote:
>
> Hello fellow camel riders!
>
> Whenever I make a processor I have to access it i. DSL using "to()". When I
> attempt to access it using "process()" i get an error message telling me
> the class could not be found in the registry.
>
> I did some experimentation and it seems as though I can use "process()" if
> I supply a lambda. In my application I am supplying class names as
> parameters to the DSL calls.
>
> Is it the case that "process()" isn't ok with taking a classname and
> instead requires a processor object supplied either by lambda or by there
> being an object already present in the registry?
>
> Thx!!



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2