apache camel sql component - how to execute only once
I've created/creating a simple Apache Camel program to move data from a
source db to a target db. I have configured a route to do this and it
works! The problem is that it just keeps executing the root every second
or so. I only want it to execute once.
I've been playing around with the timer repeatCount but can't quite get
the root right. Can anyone help me to try and re-word what i have below so
that it only executes once.
<bean id="sourceSql" class="org.apache.camel.component.sql.SqlComponent">
<property name="dataSource" ref="sourceDataSource"/>
</bean>
<bean id="targetSql" class="org.apache.camel.component.sql.SqlComponent">
<property name="dataSource" ref="targetDataSource"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<propertyPlaceholder location="classpath:sql.properties"
id="placeholder"/>
<route id="processProduct-route">
<description>route that process the orders by picking up new rows
from the database
and when done processing then update the row to mark it as
processed</description>
<from uri="sourceSql:{{sql.selectProduct}}"/>
<to uri="targetSql:{{sql.insertProduct}}"/>
<log message="${body}"/>
</route>
Thanks in advance
No comments:
Post a Comment