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

56 lines
2.4 KiB
XML
Raw Normal View History

<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-2.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="profilerDecoder" class="com.raytheon.edex.plugin.profiler.ProfilerDecoder"/>
<bean id="profilerDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg ref="profilerPluginName" />
<constructor-arg value="jms-dist:queue:Ingest.profiler?destinationResolver=#qpidDurableResolver" />
</bean>
<bean id="profilerCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="profiler-camel"/>
</bean>
<camelContext id="profiler-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!--
<endpoint id="profilerFileEndpoint" uri="file:${edex.home}/data/sbn/profiler?noop=true&amp;idempotent=false"/>
<route id="profilerFileConsumerRoute">
<from ref="profilerFileEndpoint"/>
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>profiler</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.profiler"/>
</route>
-->
<!-- Begin Profiler routes -->
<route id="profilerIngestRoute">
<from uri="jms-generic:queue:Ingest.profiler?destinationResolver=#qpidDurableResolver"/>
<setHeader headerName="pluginName">
<constant>profiler</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="profilerDecoder" method="decode"/>
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:profiler?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>