awips2/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-ingest.xml
Richard Peter d38773fc03 Issue #2368: Update JMS routing to set message persistence and durability at the config level
Former-commit-id: 449692aeff [formerly b803359eb4] [formerly 5111debc92] [formerly 449692aeff [formerly b803359eb4] [formerly 5111debc92] [formerly a5a7816b98 [formerly 5111debc92 [formerly 9ac3d2ddbeee7265b9b7879fcc6efcee95281872]]]]
Former-commit-id: a5a7816b98
Former-commit-id: 21fb70a26a [formerly db69f5b54a] [formerly 30f0c6a3141bbd70f57d9187f7478aa7a8aecd56 [formerly bc169f0a04]]
Former-commit-id: 4a8c427f1c11daaee6646c7b4ca27cb08a82416c [formerly 7fe0220024]
Former-commit-id: 4effeb83ba
2013-09-15 13:44:17 -05:00

114 lines
4.5 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">
<!-- Done to force instantiation of the NcgribTables -->
<bean id="ncgribTableLookup" class="gov.noaa.nws.ncep.edex.util.ncgrib.NcgribTableLookup" factory-method="getInstance" depends-on="ncgribRegistered" />
<bean id="ncgribNotifyTransform" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.notify.NcgribNotifyTransform" />
<bean id="ncgribDecoder" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgribDecoder"/>
<bean id="ncgridAssembler" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgridAssembler"/>
<bean id="ncgribDecodeThreads" class="java.lang.Integer">
<constructor-arg value="${ncgrib-decode.count.threads}" />
</bean>
<bean id="ingest-ncgrib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsDurableConfig" />
<property name="taskExecutor" ref="ncgribThreadPool" />
</bean>
<bean id="ncgribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" ref="ncgribDecodeThreads" />
<property name="maxPoolSize" ref="ncgribDecodeThreads" />
</bean>
<bean id="ncgribLargeFileChecker" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgribLargeFileChecker" />
<bean id="ncgribLargeFileLockRelease" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgribLockRelease" />
<bean id="ncgribCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="ncgrib-camel"/>
</bean>
<bean id="ncgribFilenameProcessor" class="gov.noaa.nws.ncep.edex.plugin.ncgrib.NcgribFileNameProcessor" />
<camelContext id="ncgrib-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="ncgribFileEndpoint" uri="file:${edex.home}/data/sbn/ncgrib?noop=true&amp;idempotent=false" />
<!-- Begin Ncgrib-grid Routes -->
<endpoint id="ncgribGridFileEndpoint" uri="file:${edex.home}/data/sbn/ncgrib-grid?noop=true&amp;idempotent=false" />
<route id="ncgribGridFileConsumerRoute">
<from ref="ncgribGridFileEndpoint" />
<bean ref="fileToString" />
<bean ref="ncgribFilenameProcessor" />
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<to uri="ingest-grib:queue:Ingest.Grib" />
</route>
<!-- End Ncgrib-grid Routes -->
<!-- Begin Ncgrib Routes -->
<route id="ncgribFileConsumerRoute">
<from ref="ncgribFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>ncgrib</constant>
</setHeader>
<to uri="ingest-ncgrib:queue:Ingest.Ncgrib" />
</route>
<route id="ncgribIngestRoute">
<from uri="ingest-ncgrib:queue:Ingest.Ncgrib?concurrentConsumers=#ncgribDecodeThreads" />
<setHeader headerName="pluginName">
<constant>ncgrib</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="ncgribLargeFileChecker" />
<bean ref="ncgribDecoder" method="decode" />
<bean ref="persist" method="persist" />
<bean ref="index" method="index" />
<bean ref="ncgridAssembler" method="process"/>
<multicast parallelProcessing="false">
<to uri="direct-vm:ncgribIngestAlert" />
<to uri="vm:ncgribNotification" />
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ncgrib?level=ERROR" />
</doCatch>
<doFinally>
<bean ref="ncgribLargeFileLockRelease" />
</doFinally>
</doTry>
</route>
<route id="ncgribIngestAlert">
<from uri="direct-vm:ncgribIngestAlert" />
<bean ref="toDataURI" method="toDataURI" />
<bean ref="processUtil" method="log" />
<to uri="vm:stageNotification" />
</route>
<route id="ncgribNotification">
<from uri="vm:ncgribNotification?concurrentConsumers=4" />
<bean ref="ncgribNotifyTransform" method="transformToMessages" />
<bean ref="serializationUtil" method="transformToThrift" />
<to uri="jms-generic:topic:ncgribNotification?timeToLive=15000" />
</route>
</camelContext>
</beans>