awips2/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml

47 lines
1.9 KiB
XML
Raw Normal View History

2022-05-05 12:34:50 -05:00
<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.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="ffmpThreadPool"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="1" />
<property name="maxPoolSize" value="1" />
<property name="keepAliveSeconds" value="60000" />
</bean>
<bean id="ffmpGenerator" class="com.raytheon.uf.edex.plugin.ffmp.FFMPGenerator">
<constructor-arg ref="ffmpThreadPool"/>
</bean>
<bean factory-bean="contextManager" factory-method="registerContextStateProcessor">
<constructor-arg ref="ffmp-camel" />
<constructor-arg ref="ffmpGenerator" />
</bean>
<bean factory-bean="cpgSrvDispatcher" factory-method="register">
<constructor-arg ref="ffmpGenerator"/>
</bean>
<camelContext id="ffmp-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<route id="FFMPGenerate">
<from uri="jms-durable:queue:ffmpGenerate"/>
<doTry>
<bean ref="serializationUtil" method="transformFromThrift" />
<bean ref="ffmpGenerator" method="generate" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ffmp?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="ffmpStageNotification">
<from uri="direct-vm:ffmpStageNotification" />
<bean ref="processUtil" method="log"/>
<to uri="direct-vm:stageNotification"/>
</route>
</camelContext>
</beans>