Skip to content

Instantly share code, notes, and snippets.

@cmoulliard
Last active December 26, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmoulliard/7097408 to your computer and use it in GitHub Desktop.
Save cmoulliard/7097408 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<!-- OSGI blueprint property placeholder -->
<cm:property-placeholder id="route.parameters" persistent-id="route.parameters" update-strategy="reload">
<!-- default properties
<cm:default-properties>
<cm:property name="result" value="mock:result"/>
</cm:default-properties>
-->
</cm:property-placeholder>
<!--
http://repo.fusesource.com/nexus/content/repositories/jboss-fuse-6.1.x/org/jboss/fuse/jboss-fuse-full/6.1.0.redhat-130/
-->
<!-- Create a file route.parameters.cfg under /etc directory with the following properties
timerUri=timer://test?period=10s
trainingQueueUri=activemq:queue:training?replyTo=TrainingResponse
-->
<!--
<bean id="greeterClient" class="com.fusesource.training.pojo.GreetClient">
<property name="greeterService">
<reference interface="com.fusesource.training.service.greet.Greeter"/>
</property>
</bean>
-->
<camelContext id="training-1" trace="true" xmlns="http://camel.apache.org/schema/blueprint">
<propertyPlaceholder id="properties" location="blueprint:route.parameters"/>
<!--
<route id="fileToBean">
<from uri="{{fileURI}}"/>
<convertBodyTo type="String"/>
<log message=">>> File received : ${body} in the thread ${threadName}" loggingLevel="INFO" logName="training"/>
<to uri="{{directURI}}"/>
</route>
<route id="direct-to-log">
<from uri="{{directURI}}"/>
<bean ref="greeterClient"/>
<log message=">>> Response received : ${body} in the thread ${threadName}"/>
</route>
-->
<route id="direct-training">
<from uri="{{timerUri}}"/>
<setBody>
<constant>Red Hat</constant>
</setBody>
<convertBodyTo type="String"/>
<inOut uri="{{trainingQueueUri}}"/>
<log message="Hello ${body} Boys, here are the headers received : ${headers} - running this thread : ${threadName}"/>
</route>
<route id="reply-to-queue-training">
<from uri="{{trainingQueueUri}}"/>
<setExchangePattern pattern="InOut"/>
<transform>
<constant>Hello Women !</constant>
</transform>
</route>
</camelContext>
</blueprint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment