70 lines
No EOL
2.4 KiB
XML
70 lines
No EOL
2.4 KiB
XML
<beans
|
|
xmlns="http://www.springframework.org/schema/beans"
|
|
xmlns:amq="http://activemq.apache.org/schema/core"
|
|
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-2.0.xsd
|
|
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
|
|
|
<bean id="tcmDecoder" class="gov.noaa.nws.ncep.edex.plugin.tcm.decoder.TcmDecoder">
|
|
<constructor-arg ref="tcmPluginName" />
|
|
</bean>
|
|
|
|
<bean id="tcmSeparator" class="gov.noaa.nws.ncep.edex.plugin.tcm.decoder.TcmSeparator" />
|
|
|
|
<bean id="tcmDistRegistry" factory-bean="distributionSrv"
|
|
factory-method="register" >
|
|
<constructor-arg value="tcm" />
|
|
<constructor-arg value="jms-dist:queue:Ingest.tcm" />
|
|
</bean>
|
|
|
|
<bean id="tcmCamelRegistered" factory-bean="contextManager"
|
|
factory-method="register" depends-on="persistCamelRegistered">
|
|
<constructor-arg ref="tcm-camel"/>
|
|
</bean>
|
|
|
|
<camelContext id="tcm-camel" xmlns="http://camel.apache.org/schema/spring"
|
|
errorHandlerRef="errorHandler"
|
|
autoStartup="false">
|
|
<endpoint id="tcmFileEndpoint" uri="file:${edex.home}/data/sbn/tcm?noop=true&idempotent=false" />
|
|
|
|
<!-- Begin Tcm routes -->
|
|
<route id="tcmFileConsumerRoute">
|
|
<from ref="tcmFileEndpoint" />
|
|
<bean ref="fileToString" />
|
|
<setHeader headerName="pluginName">
|
|
<constant>tcm</constant>
|
|
</setHeader>
|
|
<to uri="jms-generic:queue:Ingest.tcm" />
|
|
</route>
|
|
|
|
<route id="tcmIngestRoute">
|
|
<from uri="jms-generic:queue:Ingest.tcm" />
|
|
<setHeader headerName="pluginName">
|
|
<constant>tcm</constant>
|
|
</setHeader>
|
|
<doTry>
|
|
<pipeline>
|
|
<bean ref="stringToFile" />
|
|
<split streaming="true">
|
|
<method bean="tcmSeparator" method="separate" />
|
|
<doTry>
|
|
<pipeline>
|
|
<bean ref="tcmDecoder" method="decode" />
|
|
<to uri="directvm:indexAlert" />
|
|
</pipeline>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to uri="log:tcm?level=ERROR&showBody=false" />
|
|
</doCatch>
|
|
</doTry>
|
|
</split>
|
|
</pipeline>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to uri="log:tcm?level=ERROR&showBody=false"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
</camelContext>
|
|
</beans> |