[CONF] Apache Camel Routebox

2011-02-19 Thread confluence







Routebox
Page edited by Claus Ibsen


Comment:
adding an update to force html page to be updated


 Changes (2)
 




h2. Routebox Component 
*Available as of Camel 2.6*  
{warning:title=Routebox subject for change} The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. The related [Context] component may be regardes as the simpler component. This component may be @deprecated in favor of [Context]. {warning}  
The *routebox* component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.  
...
 h3. Options 
{warning:title=Routebox options subject to change} The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!  {warning}  
{div:class=confluenceTableSmall} || Name || Default Value || Description || 
...


Full Content

Routebox Component
Available as of Camel 2.6

Routebox subject for changeThe Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. The related Context component may be regardes as the simpler component. This component may be @deprecated in favor of Context.

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example



Focus Area
Coarse grained Route Examples


Department Focus
HR routes, Sales routes etc


Supply chain  B2B Focus
Shipping routes, Fulfillment routes, 3rd party services etc


Technology Focus
Database routes, JMS routes, Scheduled batch routes etc




	Fine grained routes - routes that execute a singular and specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options



 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type HashMapString, 

[CONF] Apache Camel Routebox

2011-02-10 Thread confluence







Routebox
Page edited by James Strachan


 Changes (45)
 




h2. Routebox Context Component 
 
*Available as of Camel 2.67* 
 
The *routebox* component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context. 
The *context* component allows you to create a CamelContext with a number of routes inside then treat it as a black box and refer to the local endpoints within the black box from other CamelContexts. 
 
Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions * encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is *JVM bound*.  * strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map. * exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.  
It is similar to the [Routebox] component, though the Context component tries to be really simple for end users; just a simple convention over configuration approach to refer to local endpoints inside a black box (CamelContext). 
 
The routebox component supports both consumer and producer endpoints.   Producer endpoints are of two flavors * Producers that send or dispatch incoming requests to a external routebox consumer endpoint  * Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.
Maven users will need to add the following dependency to their {{pom.xml}} for this component: {code:xml} dependency groupIdorg.apache.camel/groupId 
artifactIdcamel-routebox/artifactId artifactIdcamel-context/artifactId 
versionx.x.x/version !-- use the same version as your Camel core version -- /dependency {code} 
 h3. The need for a Camel Routebox endpoint 
 
The routebox component is designed to ease integration in complex environments needing   * a large collection of routes and   * involving a wide set of endpoint technologies needing integration in different ways In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into* Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example   ||Focus Area||Coarse grained Route Examples|||Department Focus|HR routes, Sales routes etc|   |Supply chain  B2B Focus|Shipping routes, Fulfillment routes, 3rd party services etc|   |Technology Focus|Database routes, JMS routes, Scheduled batch routes etc|   * Fine grained routes - routes that execute a singular and specific business and/or integration pattern.  Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.  
h3. URI format  {code} 
routebox:routeboxname[?options] context:camelContextId:localEndpointName[?options] 
{code}  
You can append query options to the URI in the following format, {{?option=valueoption=value...}} 
Or you can omit the context: prefix. 
 
h3. Options {warning:title=Routebox options subject to change} The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!  {warning}  {div:class=confluenceTableSmall} || Name || Default Value || Description || | {{dispatchStrategy}} | {{null}} | A string representing a key in the Camel Registry matching an object value implementing the interface _org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy_ | | {{dispatchMap}} | {{null}} | A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header *ROUTE_DISPATCH_KEY*. The HashMap value should contain inner route consumer URIs to which requests should be directed. | | {{innerContext}} | {{auto 

[CONF] Apache Camel Routebox

2011-02-10 Thread confluence







Routebox
Page edited by James Strachan


 Changes (45)
 




h2. Routebox Context Component 
 
*Available as of Camel 2.67* 
 
The *routebox* component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context. 
The *context* component allows you to create a CamelContext with a number of routes inside then treat it as a black box and refer to the local endpoints within the black box from other CamelContexts. 
 
Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions * encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is *JVM bound*.  * strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map. * exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.  
It is similar to the [Routebox] component, though the Context component tries to be really simple for end users; just a simple convention over configuration approach to refer to local endpoints inside a black box (CamelContext). 
 
The routebox component supports both consumer and producer endpoints.   Producer endpoints are of two flavors * Producers that send or dispatch incoming requests to a external routebox consumer endpoint  * Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.
Maven users will need to add the following dependency to their {{pom.xml}} for this component: {code:xml} dependency groupIdorg.apache.camel/groupId 
artifactIdcamel-routebox/artifactId artifactIdcamel-context/artifactId 
versionx.x.x/version !-- use the same version as your Camel core version -- /dependency {code} 
 h3. The need for a Camel Routebox endpoint 
 
The routebox component is designed to ease integration in complex environments needing   * a large collection of routes and   * involving a wide set of endpoint technologies needing integration in different ways In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into* Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example   ||Focus Area||Coarse grained Route Examples|||Department Focus|HR routes, Sales routes etc|   |Supply chain  B2B Focus|Shipping routes, Fulfillment routes, 3rd party services etc|   |Technology Focus|Database routes, JMS routes, Scheduled batch routes etc|   * Fine grained routes - routes that execute a singular and specific business and/or integration pattern.  Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.  
h3. URI format  {code} 
routebox:routeboxname[?options] context:camelContextId:localEndpointName[?options] 
{code}  
You can append query options to the URI in the following format, {{?option=valueoption=value...}} 
Or you can omit the context: prefix. 
 
h3. Options {warning:title=Routebox options subject to change} The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!  {warning}  {div:class=confluenceTableSmall} || Name || Default Value || Description || | {{dispatchStrategy}} | {{null}} | A string representing a key in the Camel Registry matching an object value implementing the interface _org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy_ | | {{dispatchMap}} | {{null}} | A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header *ROUTE_DISPATCH_KEY*. The HashMap value should contain inner route consumer URIs to which requests should be directed. | | {{innerContext}} | {{auto 

[CONF] Apache Camel Routebox

2011-01-31 Thread confluence







Routebox
Page edited by Ashwin Karpe


 Changes (1)
 




...
 h3. Options 
{warning:title=Routebox options subject to change!} The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!  {warning}  
{div:class=confluenceTableSmall} || Name || Default Value || Description || 
...


Full Content

Routebox Component

Available as of Camel 2.6

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example



Focus Area
Coarse grained Route Examples


Department Focus
HR routes, Sales routes etc


Supply chain  B2B Focus
Shipping routes, Fulfillment routes, 3rd party services etc


Technology Focus
Database routes, JMS routes, Scheduled batch routes etc




	Fine grained routes - routes that execute a singular and specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options
Routebox options subject to change!The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!




 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header ROUTE_DISPATCH_KEY. The HashMap value should contain inner route consumer URI's to which requests should be directed. 


 innerContext 
 auto created 
 A string representing a key in the Camel Registry matching an object value of the type org.apache.camel.CamelContext. If a CamelContext is not provided by the user a CamelContext is automatically created for deployment of inner routes. 


 innerRegistry 
 null 
 A string representing a key in the Camel Registry matching an object value that implements the interface org.apache.camel.spi.Registry. If Registry values are utilized by inner routes to create endpoints, an innerRegistry parameter must be provided 


 routeBuilders 
 empty List 
 A string representing a key in the Camel 

[CONF] Apache Camel Routebox

2011-01-31 Thread confluence







Routebox
Page edited by Ashwin Karpe


 Changes (1)
 




...
 h3. Options 
{warning:title=Routebox options subject to change!} 
The Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!  {warning} 
...


Full Content

Routebox Component

Available as of Camel 2.6

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example



Focus Area
Coarse grained Route Examples


Department Focus
HR routes, Sales routes etc


Supply chain  B2B Focus
Shipping routes, Fulfillment routes, 3rd party services etc


Technology Focus
Database routes, JMS routes, Scheduled batch routes etc




	Fine grained routes - routes that execute a singular and specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options
Routebox options subject to changeThe Routebox component will be revisited in upcoming releases to see if it can be further simplified, be more intuitive and user friendly. Watch this space!!!




 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header ROUTE_DISPATCH_KEY. The HashMap value should contain inner route consumer URI's to which requests should be directed. 


 innerContext 
 auto created 
 A string representing a key in the Camel Registry matching an object value of the type org.apache.camel.CamelContext. If a CamelContext is not provided by the user a CamelContext is automatically created for deployment of inner routes. 


 innerRegistry 
 null 
 A string representing a key in the Camel Registry matching an object value that implements the interface org.apache.camel.spi.Registry. If Registry values are utilized by inner routes to create endpoints, an innerRegistry parameter must be provided 


 routeBuilders 
 empty List 
 A string representing a key in the Camel Registry matching an object value of the type 

[CONF] Apache Camel Routebox

2011-01-07 Thread confluence







Routebox
Page edited by Ashwin Karpe


 Changes (3)
 



...
In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into* Coarse grained or higher level routes - routes with Routebox endpoints that facade a collection of inner or lower level routes that are decomposed along   
** *Business needs* -- HR routes, Sales routes etc 
** *Objectives*-- Shipping routes, Fulfillment routes etc 
** *Technologies* -- Database routes, Caching routes, polling routes etc 
  * Fine grained routes - routes that execute a specific business and/or integration pattern.  
...

Full Content

Routebox Component

Available as of Camel 2.6

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - routes with Routebox endpoints that facade a collection of inner or lower level routes that are decomposed along
	
		Business needs -- HR routes, Sales routes etc
		Objectives-- Shipping routes, Fulfillment routes etc
		Technologies -- Database routes, Caching routes, polling routes etc
	
	
	Fine grained routes - routes that execute a specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options



 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header ROUTE_DISPATCH_KEY. The HashMap value should contain inner route consumer URI's to which requests should be directed. 


 innerContext 
 auto created 
 A string representing a key in the Camel Registry matching an object value of the type org.apache.camel.CamelContext. If a CamelContext is not provided by the user a CamelContext is automatically created for deployment of inner routes. 


 innerRegistry 
 null 
 A string representing a key in the Camel Registry matching an object value that implements the interface org.apache.camel.spi.Registry. If Registry values are utilized by inner routes to create endpoints, an innerRegistry parameter must be provided 


 routeBuilders 
 empty List 
 A string representing a key in the Camel 

[CONF] Apache Camel Routebox

2011-01-07 Thread confluence







Routebox
Page edited by Ashwin Karpe


 Changes (6)
 



...
 In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into  
  * Coarse grained or higher level routes - routes with Routebox endpoints that facade a collection of inner or lower level routes that are decomposed along   
  * Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example   ||Focus Area||Coarse grained Route Examples||  
** *Business needs* -- HR |Department Focus|HR routes, Sales routes etc| 
  ** *Objectives*-- Shipping routes, Fulfillment routes etc   ** *Technologies* -- Database routes, Caching routes, polling routes etc 
  |Supply chain  B2B Focus|Shipping routes, Fulfillment routes, 3rd party services etc|   |Technology Focus|Database routes, JMS routes, Scheduled batch routes etc| 
* Fine grained routes - routes that execute a singular and specific business and/or integration pattern. 
 Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route. 
...

Full Content

Routebox Component

Available as of Camel 2.6

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - aggregated collection of inner or lower level routes exposed as Routebox endpoints that represent an integration focus area. For example



Focus Area
Coarse grained Route Examples


Department Focus
HR routes, Sales routes etc


Supply chain  B2B Focus
Shipping routes, Fulfillment routes, 3rd party services etc


Technology Focus
Database routes, JMS routes, Scheduled batch routes etc




	Fine grained routes - routes that execute a singular and specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options



 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type 

[CONF] Apache Camel Routebox

2011-01-04 Thread confluence







Routebox
Page  added by Ashwin Karpe

 

 Routebox Component

Available as of Camel 2.6

The routebox component enables the creation of specialized endpoints that offer encapsulation and a strategy based indirection service to a collection of camel routes hosted in an automatically created or user injected camel context.

Routebox endpoints are camel endpoints that may be invoked directly on camel routes. The routebox endpoint performs the following key functions

	encapsulation - acts as a blackbox, hosting a collection of camel routes stored in an inner camel context. The inner context is fully under the control of the routebox component and is JVM bound.
	strategy based indirection - direct payloads sent to the routebox endpoint along a camel route to specific inner routes based on a user defined internal routing strategy or a dispatch map.
	exchange propagation - forward exchanges modified by the routebox endpoint to the next segment of the camel route.



The routebox component supports both consumer and producer endpoints. 

Producer endpoints are of two flavors

	Producers that send or dispatch incoming requests to a external routebox consumer endpoint
	Producers that directly invoke routes in an internal embedded camel context thereby not sending requests to an external consumer.



Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-routebox/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



The need for a Camel Routebox endpoint

The routebox component is designed to ease integration in complex environments needing

	a large collection of routes and
	involving a wide set of endpoint technologies needing integration in different ways



In such environments, it is often necessary to craft an integration solution by creating a sense of layering among camel routes effectively organizing them into 

	Coarse grained or higher level routes - routes with Routebox endpoints that facade a collection of inner or lower level routes that are decomposed along
   Business needs -- HR routes, Sales routes etc
   Objectives-- Shipping routes, Fulfillment routes etc
   Technologies -- Database routes, Caching routes, polling routes etc
	Fine grained routes - routes that execute a specific business and/or integration pattern.



Requests sent to Routebox endpoints on coarse grained routes can then delegate requests to inner fine grained routes to achieve a specific integration objective, collect the final inner result, and continue to progress to the next step along the coarse-grained route.

URI format



routebox:routeboxname[?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Options



 Name 
 Default Value 
 Description 


 dispatchStrategy 
 null 
 A string representing a key in the Camel Registry matching an object value implementing the interface org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy 


 dispatchMap 
 null 
 A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header ROUTE_DISPATCH_KEY. The HashMap value should contain inner route consumer URI's to which requests should be directed. 


 innerContext 
 auto created 
 A string representing a key in the Camel Registry matching an object value of the type org.apache.camel.CamelContext. If a CamelContext is not provided by the user a CamelContext is automatically created for deployment of inner routes. 


 innerRegistry 
 null 
 A string representing a key in the Camel Registry matching an object value that implements the interface org.apache.camel.spi.Registry. If Registry values are utilized by inner routes to create endpoints, an innerRegistry parameter must be provided 


 routeBuilders 
 empty List 
 A string representing a key in the Camel Registry matching an object value of the type Listorg.apache.camel.builder.RouteBuilder. If the user does not supply an innerContext pre-primed with inner routes, the routeBuilders option must be provided as a non-empty list of RouteBuilders containing inner routes 


 innerProtocol 
 Direct 
 The Protocol used internally by the Routebox component. Can be Direct or SEDA. The Routebox component currently offers protocols that are JVM bound. 


 sendToConsumer 
 true 
 Dictates whether a Producer endpoint sends a request to an external routebox consumer. If the setting is false, the Producer creates an embedded inner context and processes requests internally. 


 forkContext 
 true 
 The Protocol used internally by the Routebox component. Can be Direct or SEDA. The Routebox component currently offers protocols that are JVM bound. 


 threads 
 

[CONF] Apache Camel Routebox

2011-01-04 Thread confluence







Routebox
Page edited by Ashwin Karpe


 Changes (49)
 



...
{div:class=confluenceTableSmall} || Name || Default Value || Description || 
| {{dispatchStrategy}} | {{null}} | A string representing a key in the Camel Registry matching an object value implementing the interface _org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy_ | 
| {{dispatchMap}} | {{null}} | A string representing a key in the Camel Registry matching an object value of the type HashMapString, String. The HashMap key should contain strings that can be matched against the value set for the exchange header *ROUTE_DISPATCH_KEY*. The HashMap value should contain inner route consumer URIs to which requests should be directed. | 
| {{innerContext}} | {{auto created}} | A string representing a key in the Camel Registry matching an object value of the type _org.apache.camel.CamelContext_. If a CamelContext is not provided by the user a CamelContext is automatically created for deployment of inner routes. | 
| {{innerRegistry}} | {{null}} | A string representing a key in the Camel Registry matching an object value that implements the interface _org.apache.camel.spi.Registry_. If Registry values are utilized by inner routes to create endpoints, an innerRegistry parameter must be provided | 
| {{routeBuilders}} | {{empty List}} | A string representing a key in the Camel Registry matching an object value of the type _Listorg.apache.camel.builder.RouteBuilder_. If the user does not supply an innerContext pre-primed with inner routes, the routeBuilders option must be provided as a non-empty list of RouteBuilders containing inner routes | 
| {{innerProtocol}} | {{Direct}} | The Protocol used internally by the Routebox component. Can be Direct or SEDA. *The Routebox component currently offers protocols that are JVM bound.* | | {{sendToConsumer}} | {{true}} | Dictates whether a Producer endpoint sends a request to an external routebox consumer. If the setting is false, the Producer creates an embedded inner context and processes requests internally. | 
...
Before sending requests it is necessary to properly configure the routebox by loading the required URI parameters into the Registry as shown below. In the case of Spring, if the necessary beans are declared correctly, the registry is automatically populated by Camel.  
h4. Example Step 1: Loading inner route details into the Registry 
{code} @Override 
...
map.put(findBook, seda:findBook); registry.bind(map, map); 
 
// Alternatively wiring a dispatch strategy to the registry registry.bind(strategy, new SimpleRouteDispatchStrategy());  
return registry; } 
...
{code}  
When sending requests to the routebox, it is not necessary for producers do not need to know the inner route endpoint URI and they can simply invoke the Routebox URI endpoint with a dispatch strategy or dispatchMap as shown below 
h4. Step 2: Optionaly using a Dispatch Strategy instead of a Dispatch Map 
 
h4. Example 2: Using a routebox producer 
Using a dispatch Strategy involves implementing the interface _org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy_ as shown in the example below.  
{code} 
from(direct:sendToStrategyBasedRoutebox) .to(routebox:multipleRoutes?innerRegistry=#registryrouteBuilders=#routesdispatchStrategy=#strategy) .to(log:Routes operation performed?showAll=true); 
public class SimpleRouteDispatchStrategy implements RouteboxDispatchStrategy { 
 
from (direct:sendToMapBasedRoutebox) 
/* (non-Javadoc)  * @see org.apache.camel.component.routebox.strategy.RouteboxDispatchStrategy#selectDestinationUri(java.util.List, org.apache.camel.Exchange) 
.to(routebox:multipleRoutes?innerRegistry=#registryrouteBuilders=#routesdispatchMap=#map) */ 
.to(log:Routes operation performed?showAll=true); 
public URI selectDestinationUri(ListURI activeDestinations, Exchange exchange) { URI dispatchDestination = null;  String operation = exchange.getIn().getHeader(ROUTE_DISPATCH_KEY, String.class); for (URI destination : activeDestinations) { if (destination.toASCIIString().equalsIgnoreCase(seda: + operation)) { dispatchDestination = destination; break; } }  return dispatchDestination; } } 
{code}  
h4. Step 2: Launching a routebox consumer 
 
h4. Lucene Producers  This component supports 2 producer