53 lines
2.2 KiB
XML
53 lines
2.2 KiB
XML
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
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">
|
|
|
|
<bean id="fileChangedStrategy" class="com.raytheon.uf.edex.esb.camel.FileChangedExclusiveReadLockStrategy">
|
|
<constructor-arg value="${manualIngest.minFileAge}" />
|
|
</bean>
|
|
|
|
<bean id="inProgressRepository" class="org.apache.camel.support.processor.idempotent.MemoryIdempotentRepository" factory-method="memoryIdempotentRepository">
|
|
<constructor-arg value="${manualIngest.inProgressCacheSize}" />
|
|
</bean>
|
|
|
|
<camelContext id="clusteredManualProc"
|
|
xmlns="http://camel.apache.org/schema/spring"
|
|
errorHandlerRef="errorHandler">
|
|
<endpoint id="manualFileEndpoint"
|
|
uri="file:${manualIngest.dropBoxPath}?
|
|
delay=${manualIngest.delay}&
|
|
useFixedDelay=false&
|
|
maxMessagesPerPoll=${manualIngest.maxMessagesPerPoll}&
|
|
noop=true&
|
|
idempotent=false&
|
|
exclusiveReadLockStrategy=#fileChangedStrategy&
|
|
inProgressRepository=#inProgressRepository&
|
|
recursive=true"/>
|
|
|
|
<endpoint id="manualIngest"
|
|
uri="vm:manualIngestQueue?
|
|
size=${manualIngest.vmQueueSize}&
|
|
concurrentConsumers=${manualIngest.threads}&
|
|
blockWhenFull=true" />
|
|
|
|
<route id="manualFileScan">
|
|
<from uri="manualFileEndpoint" />
|
|
<to uri="manualIngest" />
|
|
</route>
|
|
|
|
<route id="manualIngestRoute">
|
|
<from uri="manualIngest"/>
|
|
<bean ref="manualProc" method="moveFileToArchive"/>
|
|
<bean ref="manualProc" />
|
|
<to uri="jms-durable:queue:external.dropbox"/>
|
|
</route>
|
|
</camelContext>
|
|
|
|
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
|
|
<constructor-arg ref="clusteredManualProc" />
|
|
</bean>
|
|
|
|
</beans>
|