awips2/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/res/spring/intlsigmet-ingest.xml

72 lines
3.2 KiB
XML
Raw Normal View History

<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="intlsigmetDecoder" class="gov.noaa.nws.ncep.edex.plugin.intlsigmet.decoder.IntlSigmetDecoder">
<constructor-arg ref="intlsigmetPluginName"/>
</bean>
<bean id="intlsigmetSeparator" class="gov.noaa.nws.ncep.edex.plugin.intlsigmet.decoder.IntlSigmetSeparator"/>
<bean id="intlsigmetDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="intlsigmet" />
<constructor-arg value="jms-dist:queue:Ingest.intlsigmet" />
</bean>
<bean id="intlsigmetCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="intlsigmet-camel"/>
</bean>
<camelContext id="intlsigmet-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!--
<endpoint id="intlsigmetFileEndpoint" uri="file:${edex.home}/data/sbn/intlsigmet?noop=true&amp;idempotent=false"/>
<route id="intlsigmetFileConsumerRoute">
<from ref="intlsigmetFileEndpoint"/>
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>intlsigmet</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.intlsigmet"/>
</route>
-->
<!-- Begin IntlSigmet routes -->
<route id="intlsigmetIngestRoute">
<from uri="jms-generic:queue:Ingest.intlsigmet"/>
<setHeader headerName="pluginName">
<constant>intlsigmet</constant>
</setHeader>
<bean ref="stringToFile" />
<doTry>
<pipeline>
<split streaming="true">
<method bean="intlsigmetSeparator" method="separate"/>
<doTry>
<pipeline>
<bean ref="intlsigmetDecoder" method="decode"/>
<to uri="directvm:indexAlert"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:intlsigmet?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:intlsigmet?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>