camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Jetty as consumer in synchronous mode?
Date Thu, 12 Apr 2012 12:43:31 GMT
On Thu, Apr 12, 2012 at 2:32 PM, Laurentiu Trica
<laurentiu.trica@moredevs.ro> wrote:
> Hi Claus,
>
> Thanks for your answer. In fact I think I confused the synchronous mode
> with something else I want to do.
> I want the behavior of Jetty to be somehow synchronous in the sense that if
> the consumer receives a request (a HTTP one in Jetty's case) it should put
> a consecutive request on hold until the first one is responded.
> So it should work like this:
>
> request1 => Jetty => process => response1 |
>                                          | request2 => Jetty
=> process =>
> response2
>
> instead of:
>
> request1 => Jetty => process => response1
>     request2 => Jetty => process => response2
>
> Is this even possible?
>

Yes, set synchronous=true in the jetty endpoint, in the <to> (eg the producer)


> Thank you!
> Laurentiu
>
> On Thu, Apr 5, 2012 at 1:05 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> Hi
>>
>> If there is a difference between your computer and the server. Then
>> you should check what the difference is.
>>
>> And by synchronous, do you mean that Camel should process the message
>> using the same thread, in full synchronous mode.
>> Can you be more specific.
>>
>> What other components are involved in your route. They may leverage
>> the async routing engine.
>> And for a Camel endpoint you can force it to be synchronous, using
>> synchronous=true.
>>
>> See: http://camel.apache.org/asynchronous-routing-engine.html
>>
>>
>> On Tue, Apr 3, 2012 at 9:50 AM, Laurentiu Trica
>> <laurentiu.trica@moredevs.ro> wrote:
>> > Hello,
>> >
>> > I need to have Jetty working in synchronous mode.
>> > How can I do that? I tried using the next options but it doesn't seem to
>> > work:
>> > <from uri="jetty:
>> >
>> http://0.0.0.0:9191/logsol/?sessionSupport=true&amp;useContinuation=false"
>> > />
>> >
>> > I thought useContinuation=false would help but it seems it doesn't.
>> > On my machine it works synchronous with or without that parameter, but on
>> > the server I'm deploying it it's still working in asynchronous mode.
>> >
>> > As I read here (http://camel.apache.org/asynchronous-routing-engine.html)
>> I
>> > should use the synchronous=true option but that seems to work only for
>> > producers, and I need it to work for Jetty consumer endpoint.
>> >
>> > Can you please help me with this?
>> >
>> > Thank you!
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message