2009/4/24 Aaron Mulder <[email protected]>:
> I have a situation where a request comes in to Jetty, and goes through
> two other routes and queues before a response is generated that allows
> the HTTP response to be sent to the caller.  I'd like to be able to
> force Jetty into using continuations so it doesn't park a thread while
> those other routes are going.
>
> The async page on the wiki suggests a usage pattern that would allow
> Jetty to operate asynchronously, but it's short on specifics, and it's
> not clear I can coerce my logic into that pattern anyway.
>
> It was suggested on IRC that I file a Jira, but I just thought I'd
> collect any other thoughts on this before doing so.
>
> I guess I'm thinking it wold be nice to have like a
> "continuations=true" type parameter on a Jetty endpoint that would
> explicitly tell it to go into asynchronous mode.

Hello Aaron!

I guess Jetty uses continuations by default. The only thing is that
processors you send messages to have to support asynchronous
messaging.

If you are not sure if your processors/endpoints support async
processing you can always do something like:

from("jetty:http://0.0.0.0:1234/foo";).threads(5).to(something);

I'm writing it without actually looking into the code, so I might be
wrong, but lets check it out.

Roman

Reply via email to