-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathcamel-context.xml
22 lines (22 loc) · 1.28 KB
/
camel-context.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- SSL Connection Factory -->
<bean id="counter" class="java.util.concurrent.atomic.AtomicLong" />
<!-- Define a traditional camel context here -->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route id="producer-route">
<from id="route-timer" uri="timer://foo?delay=5000&period={{timer.period}}&repeatCount={{timer.repeat-count}}"/>
<setBody id="route-setBody">
<simple>Message ${bean:counter.incrementAndGet}</simple>
</setBody>
<log message="Sent ${body}"/>
<toD id="_amqp1" uri="{{route.to}}"/>
</route>
<route id="consumer-route">
<from id="amqp-consumer" uri="{{route.from}}"/>
<log id="route-log" message="Message received >>> ${body}"/>
</route>
</camelContext>
</beans>