On Mon, Jan 17, 2022 at 2:42 PM Vyacheslav Boyko <mail4...@gmail.com> wrote:
>
> Hi, Claus!
>
> It's not a point to stop you doing that.
> But I use .inputType() in every route in which I am able to guarantee
> the protocol. I cannot guarantee input type from Kafka because it is
> byte array, but every in-memory routes I do.
>
> It is like interface for OOP - the contract. When I read my routes line
> by line from above till bellow I read from(...).inputType(...) and it
> helps to remember the contract of interoparations.
>

You can use route description to add custom information to a route.


> Is it really so interfere with development of Kamelets?
>

Yes there is too much old legacy / very infrequent code in the core of
camel that should/must be cleaned up.


> On 1/17/22 16:15, Claus Ibsen wrote:
> > Hi
> >
> > We have some less known features in camel-core
> > https://camel.apache.org/manual/validator.html
> > https://camel.apache.org/manual/transformer.html
> >
> > That can be used to associate route(s) with a data type contract, and
> > have the route automatically validate if the input/output is as
> > expected to this contract.
> >
> > You can also associate routes with automatic transformation with 
> > data-formats.
> > However all of these are not really in use, and it has had limited
> > innovation since its addition.
> >
> > They are part of the model but to set up the validator/transformers
> > then this is not fully implemented in all DSLs and make them harder to
> > use outside Java or the legacy XML for blueprint/spring.
> >
> > Today the high level building blocks are Kamelets where you can/should
> > specify the data shape of the kamelet as input/output etc.
> >
> > In light of this I think we should deprecate the data contract we have
> > today and focus on data contracts on Kamelets, and re-architect a more
> > modern cloud native perspective for this.
> >
> > A search on the user mailing list, then, I could only find a post from
> > 2017 from a CXF user that declared Camel route with an
> > inputType(MyClassHere.class) to setup a route data type.
> >
> --
> Vyacheslav Boyko
> mailto:mail4...@gmail.com
>


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

Reply via email to