awips2/edexOsgi/com.raytheon.uf.edex.plugin.taf/res/spring/taf-ingest.xml
2017-04-21 18:33:55 -06:00

67 lines
No EOL
2.1 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-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="tafDecoder" class="com.raytheon.uf.edex.plugin.taf.TafDecoder" />
<bean id="tafSeparator" class="com.raytheon.uf.edex.plugin.taf.decoder.TafSeparator" />
<bean id="tafDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="taf" />
<constructor-arg value="jms-durable:queue:Ingest.taf"/>
</bean>
<bean id="tafHandleoupDistRegistry" factory-bean="handleoupDistributionSrv"
factory-method="register">
<constructor-arg value="taf" />
<constructor-arg value="jms-durable:queue:Ingest.taf"/>
</bean>
<camelContext id="taf-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!--
<endpoint id="tafFileEndpoint" uri="file:${edex.home}/data/sbn/taf?noop=true&amp;idempotent=false" />
<route id="tafFileConsumerRoute">
<from ref="tafFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>taf</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.taf" />
</route>
-->
<!-- Begin TAF routes -->
<route id="tafIngestRoute">
<from uri="jms-durable:queue:Ingest.taf"/>
<setHeader headerName="pluginName">
<constant>taf</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="tafSeparator" method="separate" />
<doTry>
<pipeline>
<bean ref="tafDecoder" method="decode" />
<to uri="direct-vm:indexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:taf?level=ERROR"/>
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:taf?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>