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

Kristof Sajdak commented on CAMEL-3285:
---------------------------------------


Hi Ashwin,

Browsed through the codebase just now. 
It looks quite flexible, however I feel it might not be a good fit for the use 
case which I described a while back in the camel users thread 
(http://camel.465427.n5.nabble.com/Abstracting-Routes-using-Components-td3234703.html).

To illustrate my point I would like to use the routebuilder which you have 
defined as part of your unit tests in the camel-routebox sources.

// Routes
from("seda:addToCatalog")
     .to("log:Received request for seda:addToCatalog")
     .to("bean:library?method=addToCatalog");
        
from("seda:findBook")
     .to("log:Received request for seda:findBook")
     .to("bean:library?method=findBook");
        
from("seda:findAuthor")
     .to("log:Received request for seda:findAuthor")
     .to("bean:library?method=findAuthor");

using the routebox component to address these routes it could look like the 
following :
   
    <route>
      <from uri="direct://start"/>
 

        <setHeader headerName="ROUTE_DISPATCH_KEY">
            <constant>addToCatalog</constant>
        </setHeader>
        <to 
uri="routebox:multipleRoutes?routeBuilders=#bookRoutes&amp;dispatchStrategy=#strategy"/>
    </route>


This is a little bit complex when you would have to explain this to non 
technical person.
In such a case the syntax described in the camel users thread would be more 
intuitive in my opinion :

    <route>
       <from uri="direct://start"/>
       <to uri="book://addtoCatalog"/>
    </route>


Best regards,

Kristof


> Create a new blackbox component which can encapsulate routes using a 
> specialized ProtocolBuilder endpoint (similar to RouteBuilder)
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3285
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3285
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Ashwin Karpe
>            Assignee: Ashwin Karpe
>             Fix For: 2.6.0
>
>         Attachments: camel-routebox-20101220.zip, routebox.diff
>
>
> Given below is the discussion forum thread that spawned this thought.
> http://camel.465427.n5.nabble.com/Abstracting-Routes-using-Components-td3234703.html#a3234703
> Component requirements:
>  Need a Camel component (called Backbox, maybe) that can nicely expose a 
> ProtocolBuilder endpoint that does the following
>     a> Instantiate route definitions/route(s) configured in Spring or DSL at 
> startup
>     b> Launch a Producer or Consumer with a well known protocol(s) so that a 
> client can invoke it (could be direct or seda initially but could be any 
> protocol... really) . Must support multiple consumer endpoints and routes 
> using a URI scheme.
>     c> redirect received payloads (with marshalling into an exchange if 
> necessary) to the inner route(s) since they are launched and started. If 
> there are multiple inner routes with many consumers, we could expect the user 
> to provide a clue using the payload and/or an exchange property as to how the 
> payload should be routed.
>     d> Extend from a Default Consumer, Producer, Endpoint and Component.
>     e> Internally manage inner route lifecycles and operations. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to