Former-commit-id:449692aeff
[formerlyb803359eb4
] [formerly5111debc92
] [formerly449692aeff
[formerlyb803359eb4
] [formerly5111debc92
] [formerlya5a7816b98
[formerly5111debc92
[formerly 9ac3d2ddbeee7265b9b7879fcc6efcee95281872]]]] Former-commit-id:a5a7816b98
Former-commit-id:21fb70a26a
[formerlydb69f5b54a
] [formerly 30f0c6a3141bbd70f57d9187f7478aa7a8aecd56 [formerlybc169f0a04
]] Former-commit-id: 4a8c427f1c11daaee6646c7b4ca27cb08a82416c [formerly7fe0220024
] Former-commit-id:4effeb83ba
114 lines
4.5 KiB
XML
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&idempotent=false" />
|
|
|
|
<!-- Begin Ncgrib-grid Routes -->
|
|
<endpoint id="ncgribGridFileEndpoint" uri="file:${edex.home}/data/sbn/ncgrib-grid?noop=true&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>
|