You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/05/31 08:32:24 UTC

[jira] [Created] (CAMEL-6407) Include message history in stacktraces from error handler, making it easier to know where the problem was

Claus Ibsen created CAMEL-6407:
----------------------------------

             Summary: Include message history in stacktraces from error handler, making it easier to know where the problem was
                 Key: CAMEL-6407
                 URL: https://issues.apache.org/jira/browse/CAMEL-6407
             Project: Camel
          Issue Type: New Feature
          Components: camel-core, eip
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.12.0


See post on dev mailing list
http://camel.465427.n5.nabble.com/HEADS-UP-Camel-routing-engine-dumps-message-history-when-exhausted-exception-is-logged-tp5733516.html

This allows us to dump stacktraces with details about how the message has been routed, (aka using the message history eip).

An example could be
{code}
2013-05-30 17:27:56,342 [main           ] INFO  DefaultCamelContext            - Apache Camel  (CamelContext: camel-1) started in 0.447 seconds
2013-05-30 17:27:56,357 [main           ] INFO  MockEndpoint                   - Asserting: Endpoint[mock://result] is satisfied
2013-05-30 17:27:56,362 [ - seda://start] INFO  foo                            - Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World]
2013-05-30 17:27:56,363 [ - seda://start] INFO  bar                            - Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World]
2013-05-30 17:27:56,363 [ - seda://start] INFO  baz                            - Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World]
2013-05-30 17:27:56,366 [ - seda://start] ERROR DefaultErrorHandler            - Failed delivery for (MessageId: ID-davsclaus-air-lan-59318-1369927675648-0-1 on ExchangeId: ID-davsclaus-air-lan-59318-1369927675648-0-3). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: Forced to dump stacktrace

Message History
--------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                       
[route1            ] [to1               ] [log:foo                                                                       ]
[route1            ] [to2               ] [log:bar                                                                       ]
[route1            ] [to3               ] [log:baz                                                                       ]
[route1            ] [process1          ] [org.apache.camel.processor.ReduceStacksNeededDuringRoutingTest$1$1@4591c994   ]

Stacktrace
--------------------------------------------------------------------------------------------------------------------------
java.lang.IllegalArgumentException: Forced to dump stacktrace
  at org.apache.camel.processor.ReduceStacksNeededDuringRoutingTest$1$1.process(ReduceStacksNeededDuringRoutingTest.java:59)
	at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:389)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:185)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:185)
	at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:293)
	at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:202)
	at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira