Hi Have been working with the API while implementing all these optimizations, I went for renaming Task -> Advice. As its really an before + after advice we perform in the CamelInternalProcessor.
At this time I think the optimization is done. There is a potential optimization in the SendProcessor because its used a lot, eg its the (to) in the routes. Its using the ProducerCache to send the exchange with the producer. You only see longer stacktraces if the producer fails, then you have 2-3 strack-frames from the ProducerCache. We have the potential to optimize this in SendProcessor if the producer is singleton, and not pooled (which 95%+ are). Though if the SendProcessor completes with no problem, then the stack-frames is popped, and you wont see them in any subsequent exception occurring later. eg for example forcing an exception in a mock producer, yields java.lang.IllegalArgumentException: Forced at org.apache.camel.component.mock.MockEndpoint$1.process(MockEndpoint.java:267) at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:123) at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:388) The potential optimization would be at org.apache.camel.component.mock.MockEndpoint$1.process(MockEndpoint.java:267) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:388) -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
