Grzegorz,

A final words on stack traces and the how/why you see them....

This requires a deeper and nuanced understanding of how/why Camel and routes
work the way they do. The route is not a single threaded "if then else"
statement which can simply throw an exception when it occurs and bail...

Every segment of the route in DSL is decoupled and delegates (sync/async) to
the next segment along the route. The benefits of that are threads can be
most efficiently allocated to where they are most needed from a processing
standpoint at a given point in time. This is why Camel its extremely fast
and efficient.

An metaphor for this would be in case of a sudden data burst the camel route
would resemble " a Python gobbling a deer" (sorry about the visuals :)). As
the data burst moves through the route, camel in parallel adapts threads in
the most efficient way to different route segments and deals with the load
very well and is not easily overwhelmed.

However, the side effect of this is that when exceptions occurs, stack
unwinds look more voluminous and worrisome than they actually are. What is
more, there is no chance of a stack overflow since the exceptions originate
from different segments of the route and help from a traceability
standpoint. The only way a stack would overflow would be if the error were
to occur more than 32 levels deep in Java nested procedure calls. This is
simply not the case. If you look at your stack trace, you will see that each
of the exception is being thrown from different and each route segment where
the error was seen to originate from... More importantly these are not
nested procedure calls (the DelegateAsyncProcessor itself is a clue).

I hope this clarifies things. Having worked with Camel for a long time, call
me biased, but this is not an area I would go looking for humps and beat up
the poor beast of burden :)

Cheers,

Ashwin...
 



-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/Question-on-the-proper-usage-of-Camel-tp5472181p5489369.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to