Sample - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

In the sample below we use the ref: in the URI to reference the endpoint with the Spring ID, endpoint2 :

<bean id="mybean" class="org.apache.camel.spring.example.DummyBean">
   <property name="endpoint" ref="endpoint1"/>
</bean>

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
   <jmxAgent id="agent" disabled="true"/>
   <endpoint id="endpoint1" uri="direct:start"/>
   <endpoint id="endpoint2" uri="mock:end"/>

   <route>
      <from ref="endpoint1"/>
      <to uri="ref:endpoint2"/>
   </route>
</camelContext>

You could, of course, have used the ref attribute instead:

<to ref="endpoint2"/>

Which is the more common way to write it.