1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Beansxmlns= "Http://www.springframework.org/schema/beans"3 Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"4 XMLNS:CXF= "HTTP://CAMEL.APACHE.ORG/SCHEMA/CXF"5 Xmlns:context= "Http://www.springframework.org/schema/context"6 xsi:schemalocation="7 Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 8 HTTP://CAMEL.APACHE.ORG/SCHEMA/CXF http://camel.apache.org/schema/cxf/camel-cxf.xsd9 http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsdTen Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/ Spring-context.xsd "> One A <Context:property-placeholder/> - - <BeanID= "Integrationmessageprocessor"class= "Com.exigen.dgig.message.IntegrationMessageProcessor"/> the - <BeanID= "Flowextractor"class= "Com.exigen.dgig.message.FlowIdExtractor"/> - - <BeanID= "Routestopper"class= "Com.exigen.dgig.message.RouteStopper"/> + - <BeanID= "Shutdownstrategy"class= "Org.apache.camel.impl.DefaultShutdownStrategy"> + < Propertyname= "Timeout"value= "1"/> A </Bean> at - <Cxf:cxfendpointID= "Publisheventclient" - Address= "${publisheventurl}" - ServiceClass= "com.desjardins.assurancedommages.sm840_ Integrationevenements.services.eventpublisher.v1.EventPublisherPortType " - loggingfeatureenabled= "true"/> - in <CamelcontextID= "Dgigintegrationlayer"xmlns= "Http://camel.apache.org/schema/spring"> - <RouteID= "Policyintegrationmessageroute"Shutdownrunningtask= "Completecurrenttaskonly"> to < fromURI= "Sql:select * from Policyintegrationmessage WHERE messageId are NULL ORDER by id?datasource= #dataSource & Delay=1s "/> + <Logmessage= "Found new message Transactionid:${body[transactionid]} in DB"Logginglevel= "INFO"/> - <Logmessage= "${body[messagebody]}"Logginglevel= "TRACE"/> the <onexception> * <Exception>Java.lang.Throwable</Exception> $ <Redeliverypolicymaximumredeliveries= "Ten"Redeliverydelay= "+"logretryattempted= "true"Panax Notoginseng Retryattemptedloglevel= "WARN"/> - <Processref= "Routestopper"/> the <Logmessage= "Route stopped"Logginglevel= "ERROR"/> + </onexception> A <SetHeaderHeadername= "Dbmessageid"> the < Simple>${body[id]}</ Simple> + </SetHeader> - <Processref= "Integrationmessageprocessor"/> $ < toURI= "Cxf:bean:publishEventClient"/> $ <Logmessage= "Message sent to dgig NEXT layer. Received Location: ${headers. Location} "Logginglevel= "INFO"/> - <SetHeaderHeadername= "MessageId"> - <ref>Flowextractor</ref> the </SetHeader> - < toURI= "Sql:update policyintegrationmessage SET messageid=: #messageId WHERE id=: #dbMessageId? datasource= #dataSource" />Wuyi </Route> the <RouteID= "Billingintegrationmessageroute"Shutdownrunningtask= "Completecurrenttaskonly"> - < fromURI= "Sql:select * from Billingintegrationmessage WHERE messageId are NULL ORDER by id?datasource= #dataSource & Delay=1s "/> Wu <Logmessage= "Found new message Transactionid:${body[transactionid]} in DB"Logginglevel= "INFO"/> - <Logmessage= "${body[messagebody]}"Logginglevel= "TRACE"/> About <onexception> $ <Exception>Java.lang.Throwable</Exception> - <Redeliverypolicymaximumredeliveries= "Ten"Redeliverydelay= "+"logretryattempted= "true" - Retryattemptedloglevel= "WARN"/> - <Processref= "Routestopper"/> A <Logmessage= "Route stopped"Logginglevel= "ERROR"/> + </onexception> the <SetHeaderHeadername= "Dbmessageid"> - < Simple>${body[id]}</ Simple> $ </SetHeader> the <Processref= "Integrationmessageprocessor"/> the < toURI= "Cxf:bean:publishEventClient"/> the <Logmessage= "Message sent to dgig NEXT layer. Received Location: ${headers. Location} "Logginglevel= "INFO"/> the <SetHeaderHeadername= "MessageId"> - <ref>Flowextractor</ref> in </SetHeader> the < toURI= "Sql:update billingintegrationmessage SET messageid=: #messageId WHERE id=: #dbMessageId? datasource= #dataSource "/> the </Route> About </Camelcontext> the </Beans>
View Code
Mark:camel SQL Route