132 lines
5.7 KiB
XML
132 lines
5.7 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 class="com.raytheon.uf.common.logback.appender.ThreadBasedAppender" factory-method="registerThreadPattern">
|
|
<constructor-arg value="smartInit" />
|
|
<constructor-arg value="smartInit.*" />
|
|
</bean>
|
|
|
|
<bean id="gfeSiteActivation" class="com.raytheon.edex.plugin.gfe.config.GFESiteActivation"
|
|
depends-on="commonTimeRegistered, gfeDbRegistered, levelFactoryInitialized" />
|
|
|
|
<bean id="smartInitQueue" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitQueue" factory-method="createQueue"/>
|
|
|
|
<bean id="gfeSitesActiveIngest" factory-bean="siteAwareRegistry" factory-method="register"
|
|
depends-on="smartInitQueue, gfeActivationAsyncIngest">
|
|
<constructor-arg ref="gfeSiteActivation"/>
|
|
</bean>
|
|
|
|
<bean id="gfeActivationAsyncIngest" factory-bean="contextManager" factory-method="registerAsyncStartupBean">
|
|
<constructor-arg ref="gfeSiteActivation"/>
|
|
</bean>
|
|
|
|
<bean id="smartInitSrv" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitSrv" depends-on="gfeDbRegistered, gfeSitesActiveIngest">
|
|
<property name="pendingInitMinTimeMillis" value="120000"/>
|
|
<property name="runningInitTimeOutMillis" value="600000"/>
|
|
<property name="threadSleepInterval" value="30000"/>
|
|
</bean>
|
|
|
|
<bean factory-bean="contextManager" factory-method="registerContextStateProcessor">
|
|
<constructor-arg ref="gfe-camel-spring"/>
|
|
<constructor-arg ref="smartInitSrv"/>
|
|
</bean>
|
|
|
|
<bean id="vtecChangeListener" class="com.raytheon.edex.plugin.gfe.server.notify.VTECTableChangeListener"/>
|
|
|
|
<camelContext id="gfe-camel-spring" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
|
|
<!-- TODO: This can be switched back to original thread count and use a bean to
|
|
subtract one from the thread count once this issue has been fixed.
|
|
https://issues.apache.org/jira/browse/CAMEL-7540 -->
|
|
<endpoint id="smartInitLauncher" uri="quartz://smartInitThread?trigger.repeatCount=${smartinit.additional.threads}&trigger.repeatInterval=1"/>
|
|
|
|
<route id="smartInitTrigger">
|
|
<from uri="timer://smartInitTimer?fixedRate=true&period=30000"/>
|
|
<bean ref="smartInitQueue" method="fireSmartInit"/>
|
|
</route>
|
|
|
|
<!-- Thread runs for life of context -->
|
|
<route id="smartInitThread">
|
|
<from ref="smartInitLauncher"/>
|
|
<bean ref="smartInitSrv" method="run"/>
|
|
</route>
|
|
|
|
<route id="gfeIngestNotification">
|
|
<!-- Data from plugin notification -->
|
|
<from
|
|
uri="jms-durable:queue:gfeDataURINotification"/>
|
|
<doTry>
|
|
<bean ref="serializationUtil" method="transformFromThrift"/>
|
|
<bean ref="ifpServer" method="filterDataURINotifications"/>
|
|
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to
|
|
uri="log:ifpServer?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
|
|
<route id="ifpServerPurgeNotification">
|
|
<from uri="jms-generic:queue:gfePurgeNotification"/>
|
|
<doTry>
|
|
<bean ref="ifpServer" method="pluginPurged"/>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to
|
|
uri="log:ifpServer?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
|
|
</camelContext>
|
|
|
|
<camelContext id="clusteredGfeIngestRoutes" xmlns="http://camel.apache.org/schema/spring"
|
|
errorHandlerRef="errorHandler">
|
|
|
|
<!-- Smart Init Routes -->
|
|
<!-- main route now handled through the gfeIngestNotification -->
|
|
<route id="manualSmartInit">
|
|
<from uri="jms-durable:queue:manualSmartInit?threadName=smartInitManual" />
|
|
<doTry>
|
|
<bean ref="smartInitQueue" method="addManualInit"/>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to
|
|
uri="log:smartinit?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
|
|
<route id="gfeVtecChangeNotification">
|
|
<from uri="jms-generic:topic:edex.alerts.vtec?threadName=gfe-edex.alerts.vtec"/>
|
|
<doTry>
|
|
<bean ref="serializationUtil" method="transformFromThrift"/>
|
|
<bean ref="vtecChangeListener" method="handleNotification"/>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to
|
|
uri="log:vtecChangeListener?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
|
|
<!-- Convert the topic into a queue so only one consumer gets each message and we still have competing consumers. -->
|
|
<route id="gfePurgeNotificationQueueRoute">
|
|
<from uri="jms-generic:topic:pluginPurged"/>
|
|
<doTry>
|
|
<to uri="jms-generic:queue:gfePurgeNotification"/>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to
|
|
uri="log:ifpServer?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
|
|
</camelContext>
|
|
|
|
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
|
|
<constructor-arg ref="clusteredGfeIngestRoutes"/>
|
|
</bean>
|
|
</beans>
|