awips2/edexOsgi/com.raytheon.uf.edex.plugin.cwa/res/spring/cwa-ingest.xml
2018-06-20 17:39:08 -06:00

45 lines
No EOL
1.7 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="cwaDecoder" class="com.raytheon.uf.edex.plugin.cwa.CWADecoder">
<constructor-arg ref="cwaPluginName" />
</bean>
<bean id="cwaDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg ref="cwaPluginName" />
<constructor-arg value="jms-durable:queue:Ingest.cwa" />
</bean>
<camelContext id="cwa-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<route id="cwaIngestRoute">
<from uri="jms-durable:queue:Ingest.cwa"/>
<setHeader headerName="pluginName">
<constant>cwa</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="cwaDecoder" method="decode" />
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>com.raytheon.uf.common.dataplugin.exception.MalformedDataException</exception>
<to uri="direct-vm:logFailureAsInfo" />
</doCatch>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="direct-vm:logFailedData"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>