Hi Jan,

Thanks for the explanation. So if I am writing camel component, I can use any 
library to return any object instead of standard XML / JSON / CSV format. Or if 
the external system returns in XML / JSON, pass on the data as it is in the 
'Exchange' object. The question only comes because I wanted to understand here 
the general trend before I go ahead and write the new camel component.

>>> For further conversion you could use the typeconverters.

The typeconvertors of Twitter returns only partial information of Status 
object. Doesn't pass on the Geo location for example.

Regards,
Arpit.

-----Original Message-----
From: Jan Matèrne (jhm) [mailto:[email protected]]
Sent: Tuesday, December 10, 2013 11:04 PM
To: [email protected]
Subject: AW: Why Pass Java object in Twitter (& other) component

> > Why not have standard behavior across camel components?
>
> Each component provides messages in the most
> efficient/generic/convenient way it is possible in given context.
>
> What kind of standard message format are you thinking of? JSON for
> example?

A "common" format could only be some such generic as typeless XML or JSON.
Otherwise you would find use cases where some flag, some information, some
format is missed.
The "common format" Camel uses for routing is "exchange" with its properties
and in and out messages with headers.

A Camel component has to deal with exactly one external system. So the
format used there could be focused to that external system (http header, ssl
credentials, ftp password, pgp encryption, jdbc datasource name...). The
components job is to transform that data to "exchange".

For further conversion you could use the typeconverters.

(I hope to be right ;)


Jan

Reply via email to