awips2/edexOsgi/com.raytheon.uf.edex.cpgsrv/res/spring/cpgsrv-spring.xml
Steve Harris dab00b12e6 12.8.1-5 baseline
Former-commit-id: 2653ddc2e3 [formerly fd2abfb6f1] [formerly cd49ef3eda [formerly 99fb675cc2e1b94825ccda1fe09b1be0c3c25b3f]]
Former-commit-id: cd49ef3eda
Former-commit-id: e0c3722fd1
2012-08-01 10:45:37 -05:00

64 lines
No EOL
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">
<bean id="cpgSrvDispatcher" class="com.raytheon.uf.edex.cpgsrv.CPGDispatcher" depends-on="commonTimeRegistered"/>
<bean id="cpgsrvCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="cpgsrv-camel"/>
</bean>
<camelContext id="cpgsrv-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<route id="cpgProcessAlerts">
<from uri="directvm:processCPGAlerts"/>
<bean ref="toDataURI" method="toDataURI"/>
<to uri="vm:stageNotification"/>
</route>
</camelContext>
<camelContext id="clusteredCpgSrvRoutes"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!-- Need to reroute to a queue to allow for multiple jms consumers -->
<route id="cpgsrvTopicToQueueRoute">
<from uri="jms-generic:topic:edex.alerts"/>
<!-- technically with qpid should be able to make this a durable subscription and not need to forward to another queue -->
<doTry>
<multicast>
<to uri="jms-generic:queue:cpgsrvFiltering"/>
<to uri="jms-generic:queue:scanCpgsrvFiltering"/>
<to uri="jms-generic:queue:ffmpCpgsrvFiltering"/>
</multicast>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:cpgSrv?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="cpgsrvListenerRoute">
<!-- technically with qpid should be able to make this a durable subscription and not need to forward to another queue -->
<from uri="jms-generic:queue:cpgsrvFiltering?concurrentConsumers=5&amp;destinationResolver=#qpidDurableResolver"/>
<doTry>
<pipeline>
<bean ref="serializationUtil" method="transformFromThrift" />
<bean ref="cpgSrvDispatcher" method="matchURIs"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:cpgSrv?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="clusteredCamelContextMgr"
factory-method="register">
<constructor-arg ref="clusteredCpgSrvRoutes" />
</bean>
</beans>