Hi everyone,

error handling and redelivery policy do not work fine when a main route
requests enricher from subroute. When an error accours in subroute, the
exception is propagated to main route wich handles it by DLQError handler
but the delivery attempt remains at 1. It is not incremented until the
maximum.

Log message:
Failed delivery for (MessageId: ID-FGBAL201530-55545-1453977437889-9-22 on
ExchangeId: ID-FGBAL201530-55545-1453977437889-9-5).* On delivery attempt:
1* caught: org.apache.camel.CamelExchangeException: JettyClient failed cause
by: Connection refused: no further information.
Exchange[JmsMessage@0x6b2b6e67]. Caused by: [java.net.ConnectException -
Connection refused: no further information]

This is a my route:

<route id="CRM_LoginRoute" errorHandlerRef="NoErrorHandler" >
                        <from uri="direct:crm-login" />
                                
                                <process ref="CRMLoginProcessor" />
                                <marshal ref="Gson" />
                                <log message="Sent Request login to CRM: 
${body}" loggingLevel="INFO"/>
                                <inOut
uri="jetty:{{crm.rs.host.name}}:{{crm.rs.port}}{{crm.rs.context.path}}/oauth2/token?throwExceptionOnFailure=true"
/>
                                <log message="Received Response login from CRM: 
${body}"
loggingLevel="DEBUG"/>
                                <unmarshal ref="Gson" />
                                <log message="Authentication successful on 
CRM!" />
                </route>

                
                <route id="ProcessingMessageData_Route" 
errorHandlerRef="dlqErrorHandler"
>
                        <from 
uri="activemq:queue:IF_CUSTOMER_Inbound-NormalizedTickets" />
                                        
                                        <enrich uri="direct:crm-login" 
strategyRef="OAuthStrategy"
aggregateOnException="false" />

                                
                                <log message="Token ${in.header.OAuth-Token}" 
loggingLevel="DEBUG"/>
                                <marshal ref="Gson" />
                                <setHeader headerName="Content-Type">
                                        <constant>application/json</constant>
                                </setHeader>
                                <setHeader headerName="CamelHttpMethod">
                                        <constant>POST</constant>
                                </setHeader>
                                <log message="Request sent to CRM: ${body}" 
loggingLevel="INFO" />
                                
                                
                                <setHeader headerName="CRMInsertTicketPath">
                                        <simple>
                                
jetty:{{crm.rs.host.name}}:{{crm.rs.port}}{{crm.rs.context.path}}/tk_rt_ticket/${in.header.customer-code}/insert?httpClient.idleTimeout=30000
                                        </simple>
                                </setHeader>
                                <log message="CRMInsertTicketPath:
$simple{in.header.CRMInsertTicketPath}" />
                                <recipientList stopOnException="true" 
parallelProcessing="false"
streaming="false">
                                        <header>CRMInsertTicketPath</header>
                                        <to 
uri="activemq:queue:IF_CUSTOMER_Inbound-ProcessedTickets" />
                                </recipientList>
                </route>

Thanks in advance

Best Regards 

Michele



--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-Handling-and-Redelivery-Policy-between-routes-tp5776905.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to