awips2/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-ingest.xml
2022-05-05 12:34:50 -05:00

51 lines
2.3 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="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">
<!-- Warning routes -->
<route id="warningIngestRoute">
<from uri="jms-durable:queue:Ingest.Warning"/>
<setHeader name="pluginName">
<constant>warning</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile"/>
<bean ref="warningDecoder" method="decode"/>
<bean ref="wwaGeometryCompleter" method="addMissingGeometries"/>
<to uri="direct-vm:indexAlert"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:warning?level=ERROR&amp;showBody=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>