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

61 lines
3.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-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="vtecFilter" class="com.raytheon.edex.plugin.warning.util.WarningHasVTECFilter"/>
<bean id="warningDecoder" class="com.raytheon.uf.edex.python.decoder.PythonDecoder">
<property name="pluginName" value="warning"/>
<property name="pluginFQN" value="com.raytheon.edex.plugin.warning"/>
<property name="moduleName" value="WarningDecoder"/>
<property name="cache" value="true"/>
<property name="recordClassname" value="com.raytheon.uf.common.dataplugin.warning.WarningRecord"/>
</bean>
<bean id="warningDistRegistry" factory-bean="distributionSrv" factory-method="register">
<constructor-arg value="warning"/>
<constructor-arg value="jms-durable:queue:Ingest.Warning"/>
</bean>
<bean id="warningHandleoupDistRegistry" factory-bean="handleoupDistributionSrv" factory-method="register">
<constructor-arg value="warning"/>
<constructor-arg value="jms-durable:queue:Ingest.Warning"/>
<constructor-arg value="true" /><!-- require valid distribution file for startup -->
</bean>
<bean id="wwaGeometryCompleter" class="com.raytheon.edex.plugin.warning.postprocessor.WWAGeometryCompleter"/>
<camelContext id="warning-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<!-- <endpoint id="warningEndpoint" uri="file:${edex.home}/data/sbn/warning?noop=true&amp;idempotent=false" /> <route
id="warningFileConsumerRoute"> <from ref="warningEndpoint" /> <bean ref="fileToString" /> <setHeader headerName="pluginName">
<constant>warning</constant> </setHeader> <to uri="jms-durable:queue:Ingest.Warning" /> </route> -->
<!-- Warning routes -->
<route id="warningIngestRoute">
<from uri="jms-durable:queue:Ingest.Warning"/>
<setHeader headerName="pluginName">
<constant>warning</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile"/>
<bean ref="warningDecoder" method="decode"/>
<bean ref="wwaGeometryCompleter" method="addMissingGeometries"/>
<bean ref="index" method="index"/>
<bean ref="processUtil" method="log"/>
<multicast parallelProcessing="false">
<to uri="direct-vm:stageNotification"/>
<filter>
<method bean="vtecFilter" method="hasVTEC"/>
<to uri="jms-durable:queue:activeTablePending"/>
</filter>
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:warning?level=ERROR&amp;showBody=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>