awips2/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/res/spring/wcp-ingest.xml
Richard Peter d38773fc03 Issue #2368: Update JMS routing to set message persistence and durability at the config level
Former-commit-id: 449692aeff [formerly b803359eb4] [formerly 5111debc92] [formerly 449692aeff [formerly b803359eb4] [formerly 5111debc92] [formerly a5a7816b98 [formerly 5111debc92 [formerly 9ac3d2ddbeee7265b9b7879fcc6efcee95281872]]]]
Former-commit-id: a5a7816b98
Former-commit-id: 21fb70a26a [formerly db69f5b54a] [formerly 30f0c6a3141bbd70f57d9187f7478aa7a8aecd56 [formerly bc169f0a04]]
Former-commit-id: 4a8c427f1c11daaee6646c7b4ca27cb08a82416c [formerly 7fe0220024]
Former-commit-id: 4effeb83ba
2013-09-15 13:44:17 -05:00

64 lines
No EOL
2.2 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 id="wcpDecoder" class="gov.noaa.nws.ncep.edex.plugin.wcp.decoder.WcpDecoder">
<constructor-arg ref="wcpPluginName" />
</bean>
<bean id="wcpSeparator" class="gov.noaa.nws.ncep.edex.plugin.wcp.decoder.WcpSeparator" />
<bean id="wcpDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="wcp" />
<constructor-arg value="jms-dist:queue:Ingest.wcp" />
</bean>
<bean id="wcpCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="wcp-camel"/>
</bean>
<camelContext id="wcp-camel" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="wcpFileEndpoint"
uri="file:${edex.home}/data/sbn/wcp?noop=true&amp;idempotent=false" />
<route id="wcpFileConsumerRoute"> <from ref="wcpFileEndpoint" /> <bean
ref="fileToString" /> <setHeader headerName="pluginName"> <constant>wcp</constant>
</setHeader> <to uri="jms-durable:queue:Ingest.wcp" /> </route>
<!-- Begin wcp routes -->
<route id="wcpIngestRoute">
<from uri="jms-durable:queue:Ingest.wcp" />
<setHeader headerName="pluginName">
<constant>wcp</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="wcpSeparator" method="separate" />
<doTry>
<pipeline>
<bean ref="wcpDecoder" method="decode" />
<to uri="direct-vm:indexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:wcp?level=ERROR" />
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airmet?level=ERROR" />
</doCatch>
</doTry>
</route>
</camelContext>
</beans>