You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2009/03/10 07:56:54 UTC

Re: routing like "jetty-splitter-aggregator-reply" request/response problem

On Fri, Mar 6, 2009 at 4:30 PM, beduin <ga...@intext.it> wrote:
>
> Hi, I'm building a routing like this :
>
> from jetty to
> splitter to
> aggegator to
> responseProcessor to
> mockend
>
> each endpoint is set to InOut and direct.
> Basically I want that request from jetty (that's like a batch to process)
> being splitted, processed (when all work), aggegated and have a response
> back.
> Instead what happen's that after splitted the last message is back as a
> response ... then the next endpoint will work fine but the (wrong) response
> is already back to jetty ...
> How can I tell to wait for a response by my responseProcessor ?
Hi

I am very sorry for the late reply. Was hoping someone else stepped up.
Normally the replies is much faster here at the Camel community. Hope
we didnt scare you away.

Yes Camel can do this, though the split aggregate combination and the
EIP patterns itself is hard to understand and use.
The EIP book assumes messaging and often relies on InOnly. But you
want a request-reply (InOut) and to wait for a combined response to
send back to Jetty.

I am preparing a sample for this and will add it to the wiki so I will
point to it when I get it ready in a short time.
Its really a nice use case you have and of course something others
could need to do as well.



>
> Thanks to all try give me a suggest
> --
> View this message in context: http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22374696.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: routing like "jetty-splitter-aggregator-reply" request/response problem

Posted by "wubo.neusoft" <wu...@gmail.com>.
Hi

My Situation is very similar with this.
Route 1:
>From Jetty
To Hazelcast
To bean (Generate a POJO arraylist)
splitter body 
to direct

Rout 2:
from direct
aggregate
marshal to JSON
return to Jetty (not explicitly doing anything)

It always returns empty no matter how I do.
But I use log to print out the message. The message is correct.
I don't know why it cannot be printed out to Jetty response.
I tried to set message In or Out, it doesn't make any difference.
If I use <setExchangePattern pattern="InOut" /> after from Jetty at Rout 1,
it will print out class description to Jetty, such as
com.bla.bla.classname@j234wr.

I'm actually doing multiple Hazelcast look up, but event the first search in
Hazelcast, I'm stuck.
I did a lot of code change, it eventually doesn't resolve the problem.
Am thinking it's Split issue. Because after split at Route 1, Jetty won't
get any response after route 2.
It seems Jetty return directly before split.
Hopefully, some one can help me. It will be great. Thank you very much
ahead!



--
View this message in context: http://camel.465427.n5.nabble.com/routing-like-jetty-splitter-aggregator-reply-request-response-problem-tp473793p5761480.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: routing like "jetty-splitter-aggregator-reply" request/response problem

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See the Splitter EIP where I added a sample in the bottom of the page:
http://cwiki.apache.org/confluence/display/CAMEL/Splitter

The static html page should be updated as well, but it could take eg
several hours, so the link above is for the dynamic real time wiki
pages. However they are usually a bit slower to browse, so the static
pages is better to surf
http://camel.apache.org/splitter.html


On Tue, Mar 10, 2009 at 7:56 AM, Claus Ibsen <cl...@gmail.com> wrote:
> On Fri, Mar 6, 2009 at 4:30 PM, beduin <ga...@intext.it> wrote:
>>
>> Hi, I'm building a routing like this :
>>
>> from jetty to
>> splitter to
>> aggegator to
>> responseProcessor to
>> mockend
>>
>> each endpoint is set to InOut and direct.
>> Basically I want that request from jetty (that's like a batch to process)
>> being splitted, processed (when all work), aggegated and have a response
>> back.
>> Instead what happen's that after splitted the last message is back as a
>> response ... then the next endpoint will work fine but the (wrong) response
>> is already back to jetty ...
>> How can I tell to wait for a response by my responseProcessor ?
> Hi
>
> I am very sorry for the late reply. Was hoping someone else stepped up.
> Normally the replies is much faster here at the Camel community. Hope
> we didnt scare you away.
>
> Yes Camel can do this, though the split aggregate combination and the
> EIP patterns itself is hard to understand and use.
> The EIP book assumes messaging and often relies on InOnly. But you
> want a request-reply (InOut) and to wait for a combined response to
> send back to Jetty.
>
> I am preparing a sample for this and will add it to the wiki so I will
> point to it when I get it ready in a short time.
> Its really a nice use case you have and of course something others
> could need to do as well.
>
>
>
>>
>> Thanks to all try give me a suggest
>> --
>> View this message in context: http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22374696.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: routing like "jetty-splitter-aggregator-reply" request/response problem

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 10, 2009 at 9:14 AM, beduin <ga...@intext.it> wrote:
>
>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Mar 6, 2009 at 4:30 PM, beduin <ga...@intext.it> wrote:
>>>
>>> Hi, I'm building a routing like this :
>>>
>>> from jetty to
>>> splitter to
>>> aggegator to
>>> responseProcessor to
>>> mockend
>>>
>>> each endpoint is set to InOut and direct.
>>> Basically I want that request from jetty (that's like a batch to process)
>>> being splitted, processed (when all work), aggegated and have a response
>>> back.
>>> Instead what happen's that after splitted the last message is back as a
>>> response ... then the next endpoint will work fine but the (wrong)
>>> response
>>> is already back to jetty ...
>>> How can I tell to wait for a response by my responseProcessor ?
>> Hi
>>
>> I am very sorry for the late reply. Was hoping someone else stepped up.
>> Normally the replies is much faster here at the Camel community. Hope
>> we didnt scare you away.
>>
>> Yes Camel can do this, though the split aggregate combination and the
>> EIP patterns itself is hard to understand and use.
>> The EIP book assumes messaging and often relies on InOnly. But you
>> want a request-reply (InOut) and to wait for a combined response to
>> send back to Jetty.
>>
>> I am preparing a sample for this and will add it to the wiki so I will
>> point to it when I get it ready in a short time.
>> Its really a nice use case you have and of course something others
>> could need to do as well.
>>
>>
>>
>>>
>>> Thanks to all try give me a suggest
>>> --
>>> View this message in context:
>>> http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22374696.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>
> Hi, dont'worry for late reply, i'm happy that you consider my problem ...
> Ok, now I know that this scenario is possible with Camel, I wait for your
> sample.
The sample is online
http://camel.apache.org/splitter.html


> Thanks and best regards
> Gabriele
>
> --
> View this message in context: http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22429655.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: routing like "jetty-splitter-aggregator-reply" request/response problem

Posted by beduin <ga...@intext.it>.


Claus Ibsen-2 wrote:
> 
> On Fri, Mar 6, 2009 at 4:30 PM, beduin <ga...@intext.it> wrote:
>>
>> Hi, I'm building a routing like this :
>>
>> from jetty to
>> splitter to
>> aggegator to
>> responseProcessor to
>> mockend
>>
>> each endpoint is set to InOut and direct.
>> Basically I want that request from jetty (that's like a batch to process)
>> being splitted, processed (when all work), aggegated and have a response
>> back.
>> Instead what happen's that after splitted the last message is back as a
>> response ... then the next endpoint will work fine but the (wrong)
>> response
>> is already back to jetty ...
>> How can I tell to wait for a response by my responseProcessor ?
> Hi
> 
> I am very sorry for the late reply. Was hoping someone else stepped up.
> Normally the replies is much faster here at the Camel community. Hope
> we didnt scare you away.
> 
> Yes Camel can do this, though the split aggregate combination and the
> EIP patterns itself is hard to understand and use.
> The EIP book assumes messaging and often relies on InOnly. But you
> want a request-reply (InOut) and to wait for a combined response to
> send back to Jetty.
> 
> I am preparing a sample for this and will add it to the wiki so I will
> point to it when I get it ready in a short time.
> Its really a nice use case you have and of course something others
> could need to do as well.
> 
> 
> 
>>
>> Thanks to all try give me a suggest
>> --
>> View this message in context:
>> http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22374696.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> 
> 

Hi, dont'worry for late reply, i'm happy that you consider my problem ...
Ok, now I know that this scenario is possible with Camel, I wait for your
sample.
Thanks and best regards
Gabriele

-- 
View this message in context: http://www.nabble.com/routing-like-%22jetty-splitter-aggregator-reply%22-request-response-problem-tp22374696p22429655.html
Sent from the Camel - Users mailing list archive at Nabble.com.