camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele <michele.mazzi...@finconsgroup.com>
Subject Re: Error Handling and Redelivery Policy between routes
Date Fri, 29 Jan 2016 16:07:41 GMT
Hi Stevenson,

first of all thanks a lot for your reply. ErrorHandler definitions:

<errorHandler id="NoErrorHandler" type="NoErrorHandler" />
<errorHandler id="DefaultErrorHandler" type="DefaultErrorHandler" />
		
		
		<errorHandler id="dlqErrorHandler" type="DeadLetterChannel"
			deadLetterUri="direct:failureTicketErrorHandler" >
			<redeliveryPolicy
maximumRedeliveries="{{amq.inbound.redeliverypolicy.maximum}}"
				redeliveryDelay="{{amq.inbound.redeliverypolicy.delay}}"
				allowRedeliveryWhileStopping="false" retryAttemptedLogLevel="WARN"
id="CRMRedeliveryPolicy"/>
		</errorHandler>


Logs simulating a ConnectException, 

First Attempt

16:54:26,116 | WARN  | erRedeliveryTask | HttpExchange                     |
94 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.17.v20150415 |
CONNECTION FAILED
ContentExchange@5caa572a=POST//127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token#CONNECTING(1010ms)->EXCEPTED(0ms)
java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)[:1.7.0_79]
	at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)[:1.7.0_79]
	at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:117)[:1.7.0_79]
	at
org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:79)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:292)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:597)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:532)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpClient.send(HttpClient.java:180)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.apache.camel.component.jetty8.JettyContentExchange8.send(JettyContentExchange8.java:257)[239:org.apache.camel.camel-jetty8:2.15.1.redhat-620133]
	at
org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:233)[238:org.apache.camel.camel-jetty-common:2.15.1.redhat-620133]
	at
org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86)[238:org.apache.camel.camel-jetty-common:2.15.1.redhat-620133]
	at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.builder.NoErrorHandlerBuilder$1.process(NoErrorHandlerBuilder.java:40)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Enricher.process(Enricher.java:142)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.RedeliveryErrorHandler$AsyncRedeliveryTask.call(RedeliveryErrorHandler.java:169)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.RedeliveryErrorHandler$AsyncRedeliveryTask.call(RedeliveryErrorHandler.java:116)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
	at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
16:54:26,116 | DEBUG | erRedeliveryTask | Pipeline                         |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Message exchange
has failed: so breaking out of pipeline for exchange:
Exchange[JmsMessage@0x17612b3b] Exception:
org.apache.camel.CamelExchangeException: JettyClient failed cause by:
Connection refused: no further information. Exchange[JmsMessage@0x17612b3b].
Caused by: [java.net.ConnectException - Connection refused: no further
information]
16:54:26,116 | WARN  | erRedeliveryTask | DeadLetterChannel                |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Failed delivery
for (MessageId: ID-FGBAL201530-64820-1454082785830-0-11 on ExchangeId:
ID-FGBAL201530-64820-1454082785830-0-5). On delivery attempt: 1 caught:
org.apache.camel.CamelExchangeException: JettyClient failed cause by:
Connection refused: no further information. Exchange[JmsMessage@0x17612b3b].
Caused by: [java.net.ConnectException - Connection refused: no further
information]
16:54:26,116 | DEBUG | erRedeliveryTask | DeadLetterChannel                |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Redelivery delay
calculated as 60000


Second Attempt

16:55:26,119 | INFO  | erRedeliveryTask | CRM_LoginRoute                   |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | START -
CRM_LoginRoute
16:55:26,119 | DEBUG | erRedeliveryTask | CRMLoginProcessor                |
331 - CRT2-ESB-Commons - 0.0.1.SNAPSHOT | START - Prepare CRM Request Login
16:55:26,119 | DEBUG | erRedeliveryTask | CRMLoginProcessor                |
331 - CRT2-ESB-Commons - 0.0.1.SNAPSHOT | END - Prepare CRM Request Login
16:55:26,119 | INFO  | erRedeliveryTask | CRM_LoginRoute                   |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Sent Request
login to CRM:
{"platform":"base_IF-Customer_1454082926119","username":"admin","client_secret":"","grant_type":"password","client_id":"sugar","password":"admin"}
16:55:26,119 | DEBUG | erRedeliveryTask | SendProcessor                    |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | >>>>
Endpoint[http://127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token]
Exchange[JmsMessage@0x713093a5]
16:55:26,119 | DEBUG | erRedeliveryTask | HttpExchange                     |
94 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.17.v20150415 | URI =
http://127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token
16:55:26,119 | DEBUG | erRedeliveryTask | JettyHttpProducer                |
238 - org.apache.camel.camel-jetty-common - 2.15.1.redhat-620133 | Sending
HTTP request to: http://127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token
16:55:26,119 | DEBUG | erRedeliveryTask | HttpExchange                     |
94 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.17.v20150415 |
setStatus 1
ContentExchange@2c2d6fb1=POST//127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token#START(0ms)->CONNECTING(0ms)
16:55:26,359 | DEBUG | ming/LOTTOMATICA | FileConsumer                     |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Took 0.000
seconds to poll: C:\CRT-2.0\IF-Customer\incoming\LOTTOMATICA
16:55:26,359 | DEBUG | mer/incoming/BNL | FileConsumer                     |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Took 0.000
seconds to poll: C:\CRT-2.0\IF-Customer\incoming\BNL
16:55:26,861 | DEBUG | mer/incoming/BNL | FileConsumer                     |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Took 0.000
seconds to poll: C:\CRT-2.0\IF-Customer\incoming\BNL
16:55:26,861 | DEBUG | ming/LOTTOMATICA | FileConsumer                     |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Took 0.000
seconds to poll: C:\CRT-2.0\IF-Customer\incoming\LOTTOMATICA
16:55:27,131 | DEBUG | erRedeliveryTask | HttpExchange                     |
94 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.17.v20150415 |
setStatus 9
ContentExchange@2c2d6fb1=POST//127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token#CONNECTING(1012ms)->EXCEPTED(0ms)
16:55:27,131 | WARN  | erRedeliveryTask | HttpExchange                     |
94 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.17.v20150415 |
CONNECTION FAILED
ContentExchange@2c2d6fb1=POST//127.0.0.1:81/CRT_2_0/rest/v10/oauth2/token#CONNECTING(1012ms)->EXCEPTED(0ms)
java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)[:1.7.0_79]
	at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)[:1.7.0_79]
	at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:117)[:1.7.0_79]
	at
org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:79)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:292)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:597)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:532)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.eclipse.jetty.client.HttpClient.send(HttpClient.java:180)[94:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at
org.apache.camel.component.jetty8.JettyContentExchange8.send(JettyContentExchange8.java:257)[239:org.apache.camel.camel-jetty8:2.15.1.redhat-620133]
	at
org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:233)[238:org.apache.camel.camel-jetty-common:2.15.1.redhat-620133]
	at
org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86)[238:org.apache.camel.camel-jetty-common:2.15.1.redhat-620133]
	at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.builder.NoErrorHandlerBuilder$1.process(NoErrorHandlerBuilder.java:40)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.Enricher.process(Enricher.java:142)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.RedeliveryErrorHandler$AsyncRedeliveryTask.call(RedeliveryErrorHandler.java:169)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at
org.apache.camel.processor.RedeliveryErrorHandler$AsyncRedeliveryTask.call(RedeliveryErrorHandler.java:116)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
	at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
16:55:27,131 | DEBUG | erRedeliveryTask | Pipeline                         |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Message exchange
has failed: so breaking out of pipeline for exchange:
Exchange[JmsMessage@0x713093a5] Exception:
org.apache.camel.CamelExchangeException: JettyClient failed cause by:
Connection refused: no further information. Exchange[JmsMessage@0x713093a5].
Caused by: [java.net.ConnectException - Connection refused: no further
information]
16:55:27,131 | WARN  | erRedeliveryTask | DeadLetterChannel                |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Failed delivery
for (MessageId: ID-FGBAL201530-64820-1454082785830-0-13 on ExchangeId:
ID-FGBAL201530-64820-1454082785830-0-5). On delivery attempt: 1 caught:
org.apache.camel.CamelExchangeException: JettyClient failed cause by:
Connection refused: no further information. Exchange[JmsMessage@0x713093a5].
Caused by: [java.net.ConnectException - Connection refused: no further
information]
16:55:27,131 | DEBUG | erRedeliveryTask | DeadLetterChannel                |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Redelivery delay
calculated as 60000


Thanks in advance

Best regards

Michele



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

Mime
View raw message