[ https://issues.apache.org/activemq/browse/CAMEL-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55404#action_55404 ]
Sergey Beryozkin commented on CAMEL-2169: ----------------------------------------- And this is what this JIRA proposes to eliminate. Example. At the service mix side we have a servicemix-camel component. So we have already written a component number one. Now, it's not enough actually, so we've also written a camel-jbi component. So if if were to reuse the above route in Camel then I'd have to : - write a Mule mule-camel (similarly to servicemix-camel) - write a Camel-Mule component and then For ServiceMix : <camel:camelContext> <camel:from uri="jbi:bar" /> <camel:to uri="log:test" /> </camel:route> </camel:camelContext> For Mule : <camel:camelContext> <camel:from uri="mule:bar" /> <camel:to uri="log:test" /> </camel:route> </camel:camelContext> /etc This is what I said in the very first comments : routes are unportable. I could've had a repository of Camel routes and reuse them from SMX/Mule/Whatever - but I won't be able to do it. If this JIRA were implemented then ServiceMix Camel would just be enhanced a bit to create internal J BI endpoints from route ids. And for Mule and I'd do a mule-camel at the Mule side. I appreciate that some routes may need to be specific and use from:. But many don't have to know about the upstream endpoints which may delegate to it. You could've made a camel-jbi eventually redundant. And guess what, it's only an attribute like id that has to be added to routeDefinition for the above reusability and portability to become a reality at some later stage. > Support identifiers for Camel routes > ------------------------------------ > > Key: CAMEL-2169 > URL: https://issues.apache.org/activemq/browse/CAMEL-2169 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.2.0 > Reporter: Sergey Beryozkin > > Camel routes embedded in camel contexts have no identifiers thus for a route > to kick in it has to start (in some cases at least) from a "from:" rule. > Example from a route working in SMX/JBI : > <camel:camelContext> > <camel:route> > <camel:from > uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/receiver/endpoint" > /> > <camel:to > uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/staticlistener/staticendpoint" > /> > </camel:route> > </camel:camelContext> > The problem is that it makes a given route definition 'unportable' and > requires a Camel developer to know some cryptic details like the fully > qualified name of the internal JBI endpoint. > If I could do something like > <camel:camelContext> > <camel:route > id="{http://servicemix.apache.org/samples/wsdl-first/receiver}endpoint"> > <camel:to > uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/staticlistener/staticendpoint" > /> > </camel:route> > </camel:camelContext> > then I'd be able to delegate to it easily from some other JBI endpoint, using > targetService="person:endpoint" > Likewise, camel routes could delegate to other routes : > <camel:route > id="{http://servicemix.apache.org/samples/wsdl-first/receiver}endpoint"> > <camel:to > uri="route:http://servicemix.apache.org/samples/wsdl-first/staticlistener/staticendpoint" > /> > </camel:route> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.