awips2/edexOsgi/com.raytheon.uf.edex.plugin.taf/res/spring/taf-ingest.xml

57 lines
2.3 KiB
XML
Raw Normal View History

2022-05-05 12:34:50 -05:00
<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="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">
<!-- Begin TAF routes -->
<route id="tafIngestRoute">
<from uri="jms-durable:queue:Ingest.taf"/>
<setHeader name="pluginName">
<constant>taf</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method ref="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>