awips2/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-file-endpoint.xml
Stephen Gilbert 06d85fccc6 VLab Issue #3720 - NCEP EDEX and EDEX Common delivery for 14.3.1
Removed dependency on persistCamelRegistered from ncgrib spring config

Change-Id: I84e7b6fc6e50f9d1795e887a9fb30f9cdda3a7f8

Former-commit-id: 0dff405bc4 [formerly 3b8233dd88] [formerly 0dff405bc4 [formerly 3b8233dd88] [formerly 4299e7c72c [formerly a7140f38a54a577dd2d62cc551ab182b561f6fc0]]]
Former-commit-id: 4299e7c72c
Former-commit-id: 2c50057a68 [formerly e07ae7a2f2]
Former-commit-id: e7f7a9be50
2014-05-22 14:35:49 -04:00

75 lines
3.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-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="ncgribFilenameProcessor" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgribFileNameProcessor"/>
<bean id="ncgribGridPointLock" class="com.raytheon.edex.plugin.grib.GribGridPointLock">
<constructor-arg value="${ncgrib-decode.count.gridpoints}"/>
<constructor-arg value="${ncgrib-decode.count.threads}"/>
</bean>
<camelContext id="ncgrib-file-endpoint" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<endpoint id="gribFileEndpoint" uri="file:${edex.home}/data/sbn/grib?noop=true&amp;idempotent=false"/>
<route id="gribFileConsumerRoute">
<from ref="gribFileEndpoint"/>
<bean ref="fileToString"/>
<bean ref="ncgribFilenameProcessor"/>
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.ncGrib"/>
</route>
</camelContext>
<camelContext id="ncgrib-qpid-endpoint" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="ncgribJmsEndpoint" uri="jms-durable:queue:Ingest.ncGrib?concurrentConsumers=${ncgrib-decode.count.threads}"/>
<route id="ncgribFileNameConsumerRoute">
<from ref="ncgribJmsEndpoint"/>
<doTry>
<pipeline>
<bean ref="ncgribFilenameProcessor"/>
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<bean ref="stringToFile"/>
<split streaming="true">
<method bean="gribSplitter" method="split"/>
<doTry>
<pipeline>
<bean ref="ncgribGridPointLock" method="reserve"/>
<bean ref="gribDecoder"/>
<bean ref="gribPostProcessor" method="process"/>
<to uri="direct-vm:persistIndexAlert"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ncgrib?level=ERROR"/>
</doCatch>
<doFinally>
<bean ref="ncgribGridPointLock" method="release"/>
</doFinally>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ncgrib?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="contextManager"
factory-method="registerClusteredContext">
<constructor-arg ref="ncgrib-file-endpoint"/>
</bean>
</beans>