You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kiranreddykasa <ki...@fss.co.in> on 2013/02/07 13:43:01 UTC

building response along with request data

Hi

I have the following route

 from(netty:localhost).to(first processor).to(netty:external).to(second
processor)

Suppose a client has sent a request with some ten fields and after
processing at first processor

then it is sent to external host with only five fields and then to second
processor.

Now how can i send the response to the client by combining all  the
fields(first ten and any additional fields).





-----
Regards

kiran Reddy
--
View this message in context: http://camel.465427.n5.nabble.com/building-response-along-with-request-data-tp5727111.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: AW: building response along with request data

Posted by Raul Kripalani <ra...@evosent.com>.
For more complex scenarios where you want durability across Camel restarts,
it could make sense to persist the message in a db, to use message queues,
correlations, etc. What not.

In most cases, this is not necessary, especially when dealing with
synchronous interactions, where the client is waiting for an immediate
answer.

The enricher EIP is more than enough for those cases.

Regards,
Raúl.
 On 9 Feb 2013 12:19, "Jan Matèrne (jhm)" <ap...@materne.de> wrote:

> For me (as beginner) that sounds more like
> - "save the message": message store
> - "relate": correlation identifier
> Maybe "claim check" ...
>
> Jan
>
> -----Ursprüngliche Nachricht-----
> Von: Raul Kripalani [mailto:raul@evosent.com]
> Gesendet: Samstag, 9. Februar 2013 11:37
> An: users@camel.apache.org
> Betreff: Re: building response along with request data
>
> The enricher EIP does that for you. You just worry about writing the code
> to
> merge the data from both messages.
>
> Raúl.
> On 9 Feb 2013 08:18, "kiranreddykasa" <ki...@fss.co.in> wrote:
>
> >
> > Yeah but where can I can save the request message until it gets
> > processed..??
> >
> > And after saving how can co relate the request and response ??
> >
> >
> >
> > -----
> > Regards
> >
> > kiran Reddy
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/building-response-along-with-request
> > -data-tp5727111p5727268.html Sent from the Camel - Users mailing list
> > archive at Nabble.com.
> >
>
>

AW: building response along with request data

Posted by "Jan Matèrne (jhm)" <ap...@materne.de>.
For me (as beginner) that sounds more like
- "save the message": message store
- "relate": correlation identifier
Maybe "claim check" ...

Jan

-----Ursprüngliche Nachricht-----
Von: Raul Kripalani [mailto:raul@evosent.com] 
Gesendet: Samstag, 9. Februar 2013 11:37
An: users@camel.apache.org
Betreff: Re: building response along with request data

The enricher EIP does that for you. You just worry about writing the code to
merge the data from both messages.

Raúl.
On 9 Feb 2013 08:18, "kiranreddykasa" <ki...@fss.co.in> wrote:

>
> Yeah but where can I can save the request message until it gets 
> processed..??
>
> And after saving how can co relate the request and response ??
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/building-response-along-with-request
> -data-tp5727111p5727268.html Sent from the Camel - Users mailing list 
> archive at Nabble.com.
>


Re: building response along with request data

Posted by Raul Kripalani <ra...@evosent.com>.
The enricher EIP does that for you. You just worry about writing the code
to merge the data from both messages.

Raúl.
On 9 Feb 2013 08:18, "kiranreddykasa" <ki...@fss.co.in> wrote:

>
> Yeah but where can I can save the request message until it gets
> processed..??
>
> And after saving how can co relate the request and response ??
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/building-response-along-with-request-data-tp5727111p5727268.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: building response along with request data

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Feb 9, 2013 at 9:18 AM, kiranreddykasa <ki...@fss.co.in> wrote:
>
> Yeah but where can I can save the request message until it gets
> processed..??
>
> And after saving how can co relate the request and response ??
>

Read the docs, and try it out with your own hands. This is how you learn.


>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/building-response-along-with-request-data-tp5727111p5727268.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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: building response along with request data

Posted by kiranreddykasa <ki...@fss.co.in>.
Yeah but where can I can save the request message until it gets
processed..??

And after saving how can co relate the request and response ??



-----
Regards

kiran Reddy
--
View this message in context: http://camel.465427.n5.nabble.com/building-response-along-with-request-data-tp5727111p5727268.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: building response along with request data

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 7, 2013 at 1:43 PM, kiranreddykasa <ki...@fss.co.in> wrote:
> Hi
>
> I have the following route
>
>  from(netty:localhost).to(first processor).to(netty:external).to(second
> processor)
>
> Suppose a client has sent a request with some ten fields and after
> processing at first processor
>
> then it is sent to external host with only five fields and then to second
> processor.
>
> Now how can i send the response to the client by combining all  the
> fields(first ten and any additional fields).
>

You can use the content enricher EIP
http://camel.apache.org/content-enricher.html



>
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/building-response-along-with-request-data-tp5727111.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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen