December 2013
Intermediate to advanced
424 pages
9h 7m
English
When an endpoint is going to be used multiple times in a Camel context it is preferable to define it at a single place so that it is used consistently. This recipe will show you a way to do that.
Define your desired routing logic as described in either the Using Camel in a Java application recipe, or the Embedding Camel in a Spring application recipe.
In the XML DSL, define an <endpoint/> element with an id attribute and an uri attribute setting that is set to the URI value you wish to share:
<camelContext xmlns="..."> <endpoint id="restfulOrdersService" uri="jetty:http://localhost:8080/orders"/> <route> <from ref="restfulOrdersService"/> <!-- ... --> </route> </camelContext>
If using the Java DSL, ...
Read now
Unlock full access