[ 
https://issues.apache.org/jira/browse/CAMEL-11475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210746#comment-16210746
 ] 

Nicola Ferraro commented on CAMEL-11475:
----------------------------------------

I think this is widely applicable also in many other contexts, e.g. to define a 
"custom mapper as a connector" and any kind of intermediate "step" or 
"producer-like" endpoints.

It will be also easy to write in the route how connector properties should be 
used.

Connectors have usually few properties. E.g.

{code}
// inside a ConnectorBuilder
from("connector:step")
  .to("http://{{host}}:{{port}}/data";);
{code}

Where host and port are properties defined at connector level. Differently from 
standard RouteBuilder objects, we can make sure that "host" and "port" here are 
assigned from the configured parameters for the specific endpoint and not from 
global parameters.

I think this is a handy way to create a connector, as connectors created this 
way are not limited to be just an "extension" of an existing component.





> Provide a route Connector/Component
> -----------------------------------
>
>                 Key: CAMEL-11475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11475
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-connector, camel-core
>            Reporter: Zoran Regvart
>
> With Connectors there is a ability to provide simplified one use case focused 
> Camel components, I think this can be further extended to have a way of 
> creating Components/Connectors out of Routes (perhaps just from 
> RouteDefinition).
> A component that would look like any other Camel component but would be 
> defined using a route.
> This would enable more functionality in a simple to use component.
> One example of this would be getting data out of Salesforce on change within 
> Salesforce. Currently you would need to string two Salesforce endpoints: a 
> streaming consumer and a fetching producer, something like:
> {code:java}
> from("salesforce:accountsTopic?...")
>   .setHeader("sObjectId", ...)
>   .to("salesforce:getSObject?...")
> {code}
> could be simplified into:
> {code:java}
> from("salesforce-account-updates")
> {code}
> Currently Connectors have pre/post processors that can achieve something 
> similar, but this would enable more complex use cases.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to