awips2/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/res/spring/airmet-ingest.xml
Steve Harris 8485b90ff8 12.4.1-10 baseline
Former-commit-id: bf53d06834caa780226121334ac1bcf0534c3f16
2012-05-01 18:06:13 -05:00

72 lines
No EOL
3 KiB
XML
Executable file

<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
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-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="airmetDecoder" class="gov.noaa.nws.ncep.edex.plugin.airmet.decoder.AirmetDecoder">
<constructor-arg ref="airmetPluginName"/>
</bean>
<bean id="airmetSeparator" class="gov.noaa.nws.ncep.edex.plugin.airmet.decoder.AirmetSeparator"/>
<bean id="airmetDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="airmet" />
<constructor-arg value="jms-dist:queue:Ingest.airmet" />
</bean>
<bean id="airmetCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="airmet-camel"/>
</bean>
<camelContext id="airmet-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!--
<endpoint id="airmetFileEndpoint" uri="file:${edex.home}/data/sbn/airmet?noop=true&amp;idempotent=false"/>
<route id="airmetFileConsumerRoute">
<from ref="airmetFileEndpoint"/>
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>airmet</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.airmet"/>
</route>
-->
<!-- Begin Airmet routes -->
<route id="airmetIngestRoute">
<from uri="jms-generic:queue:Ingest.airmet"/>
<setHeader headerName="pluginName">
<constant>airmet</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="airmetSeparator" method="separate"/>
<doTry>
<pipeline>
<bean ref="airmetDecoder" method="decode"/>
<to uri="directvm:indexAlert"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airmet?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airmet?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>