awips2/edexOsgi/com.raytheon.edex.plugin.grib/res/spring/grib-ingest.xml
Steve Harris 97c4db937e 12.5.1-15 baseline
Former-commit-id: 8552902906 [formerly b13cbb7e00] [formerly 3904c4ccf5 [formerly 4909e0dd166e43c22a34d96aa744f51db8a7d6c0]]
Former-commit-id: 3904c4ccf5
Former-commit-id: 676ea3192f
2012-06-08 13:39:48 -05:00

108 lines
4.3 KiB
XML

<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">
<!-- Done to force instantiation of the GribTables -->
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gribRegistered" />
<bean id="gribNotifyQueue"
class="com.raytheon.edex.plugin.grib.notify.GribNotifyQueue">
<property name="destinationUri" value="jms-generic:queue:gribNotification"/>
</bean>
<bean id="gribDecoder" class="com.raytheon.edex.plugin.grib.GribDecoder" />
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gribStaticDataGenerator"
class="com.raytheon.edex.plugin.grib.topo.StaticDataGenerator"
factory-method="getInstance"/>
<bean id="ingest-grib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsIngestGribConfig" />
<property name="taskExecutor" ref="gribThreadPool" />
</bean>
<bean id="jmsIngestGribConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsConfig" factory-method="copy">
</bean>
<bean id="gribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="4" />
<property name="maxPoolSize" value="4" />
</bean>
<bean id="largeFileChecker" class="com.raytheon.edex.plugin.grib.GribLargeFileChecker" />
<bean id="largeFileLockRelease" class="com.raytheon.edex.plugin.grib.GribLockRelease" />
<bean id="gribCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grib-camel"/>
</bean>
<camelContext id="grib-camel" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!-- <endpoint id="gribFileEndpoint" uri="file:${edex.home}/data/sbn/grib?noop=true&amp;idempotent=false"
/> <route id="gribFileConsumerRoute"> <from ref="gribFileEndpoint" /> <bean
ref="fileToString" /> <setHeader headerName="pluginName"> <constant>grib</constant>
</setHeader> <to uri="ingest-grib:queue:Ingest.Grib" /> </route> -->
<!-- Begin Grib Routes -->
<route id="gribIngestRoute">
<from uri="ingest-grib:queue:Ingest.Grib?concurrentConsumers=4&amp;destinationResolver=#qpidDurableResolver" />
<setHeader headerName="pluginName">
<constant>grib</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="largeFileChecker" />
<bean ref="gribDecoder" method="decode" />
<bean ref="gribPostProcessor" method="process" />
<bean ref="persist" method="persist" />
<bean ref="index" method="index" />
<bean ref="processUtil" method="log" />
<bean ref="persist" method="removeRawData" />
<multicast parallelProcessing="false">
<to uri="directvm:gribIngestAlert"/>
<to uri="directvm:gribNotification"/>
<to uri="vm:staticTopoGenerator"/>
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
<doFinally>
<bean ref="largeFileLockRelease" />
</doFinally>
</doTry>
</route>
<route id="gribIngestAlert">
<from uri="directvm:gribIngestAlert" />
<bean ref="toDataURI" method="toDataURI" />
<to uri="vm:stageNotification" />
</route>
<route id="gribNotification">
<from uri="directvm:gribNotification"/>
<bean ref="gribNotifyQueue" method="addRecords"/>
</route>
<route id="gribStaticTopoGen">
<from uri="vm:staticTopoGenerator" />
<!-- genStaticTopoRecords stores to hdf5 and the database as part of method -->
<bean ref="gribStaticDataGenerator"/>
<multicast parallelProcessing="false">
<to uri="directvm:gribIngestAlert"/>
<to uri="directvm:gribNotification"/>
</multicast>
</route>
</camelContext>
</beans>