You custom com.foo.example.asynchronous.SimpleSynchronousProcessor need to support async as well. This breaks the async routing, if it does not implement AsyncProcessor api.
Try removing it as it does not seem to do much for your use-case. On Tue, Nov 20, 2012 at 11:57 AM, giZmo79-2 <alexandre.neubert....@gmail.com> wrote: > Hello, > > I am trying to deploy a simple route where one component should behave > asynchronously (caller thread should be freed until treatment is complete). > Here is my route description: > > - Camel jetty component listening to incoming requests on port 8080 > - A first simple processor doing almost nothing (will be used for > computation later on in my app) > - An asynchronous producer sleeping for 10 sec and logging (example taken > from Camel in action chapter 10) > > Here is what I observe: > - Jetty handles an incoming request using a thread from it's pool > - The same thread is used in the first processor > - In the asynchronous producer, the caller thread returns false and another > thread is created (from a camel pool) to perform the sleep, but the caller > thread is not freed (it is not able to take another incoming request until > the treatment is completed). Even more weired, if I increase the thread pool > of Jetty and try to request twice in parallel, Jetty treats the first > request AND THEN the second) > > Here is what I expected to observe: > - Jetty handles an incoming request using a thread from it's pool > - The same thread is used in the first processor > - In the asynchronous producer, the caller thread returns false and another > thread is created (from a camel pool) to perform the sleep. The caller > thread (Jetty) is freed and can treat another incoming request. When the > request treatment ends (callback), the response is returned to the caller. > > I followed the example from Camel in Action chapter 10. To be accurate, I > join an eclipse project with my code. To execute, just type mvn clean > jetty:run. > > What am I missing here? Is the asynchronous producer the right way to go? > > Thanks a lot for your help. > > A. > asynchronous.zip > <http://camel.465427.n5.nabble.com/file/n5722998/asynchronous.zip> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-component-asynchronous-behavior-tp5722998.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen