You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ettoregia <et...@gmail.com> on 2015/01/13 18:29:12 UTC

Camel jms listener on JMSReplyTo bahaviour

Hi all,

from the documentation I saw that when within a Camel route I send a msg on
a jms destination, with either a replyTo option set or specifying the MEP as
InOut, Camel will then instantiate a jms listener to listen to that
JMSReplyTo dest.

So far so good, at least if that is correct. My point now is, how can I
control that listener, I mean when a msg is delivered to my replyTo dest,
and the listener receives it, how can I get hold of that msg?

On slightly different note, how would you implement a scenario where a
dynamic replyTo should be used? I mean from  here
<http://camel.465427.n5.nabble.com/set-jms-reply-to-in-message-header-td4420767.html>  
I got to know that Camel, and with good reason, does not implement that
feature, but it seems to me that the replyTo is meaningless then. 

If I want to send a msg using a Rest PUT, where a camel rest consumer would
read it, pass to a processor, and then sent a response back to myself on a
destination specified by the JMSReplyTo, how'd go with this?

Hopefully all is clear enough.

Kind regards,
Ettore.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-jms-listener-on-JMSReplyTo-bahaviour-tp5761654.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel jms listener on JMSReplyTo bahaviour

Posted by Ettoregia <et...@gmail.com>.
Hi contactreji,

thanks for your reply.

I'm getting my response back through http with 200, but that is just an ACK.
The point is, once the Camel rest consumer received the msg, that same msg
is produced to a JMS queue, where an external application will read the
message and at some point will send back a response given that I changed the
MEP to InOut.
Now, the external app should use the random replyTo value to send the
response back, and that is my question, how do I retrieve that response? If
Camel instantiate a listener on the replyTo destination, how I get hold of
msg returned on the replyTo dest?

I report the second part of my question here for easier readability:
---------------------------------------------------------------------------------------------------------
On a slightly different note, how would you implement a scenario where a 
dynamic replyTo should be used? I mean from  here 
<
http://camel.465427.n5.nabble.com/set-jms-reply-to-in-message-header-td4420767.html
> 
I got to know that Camel, and with good reason, does not implement that 
feature, but it seems to me that the replyTo is meaningless then. 
 
> If I want to send a msg using a Rest PUT, where a camel rest consumer
> would 
> read it, pass to a processor, and then sent a response back to myself on a 
> destination specified by the JMSReplyTo, how'd go with this? 
---------------------------------------------------------------------------------------------------------



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-jms-listener-on-JMSReplyTo-bahaviour-tp5761654p5761669.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel jms listener on JMSReplyTo bahaviour

Posted by Reji Mathews <co...@gmail.com>.
Hey Ett

I understand that u are sending request via REST request.
You should be getting the response as a REST response  with some http
status codes isn't it ?

Why are you polling the jms queue for  the response from your processor .
It should already build build a response and send it back to ur REST client

Cheers
Reji
On 13 Jan 2015 22:59, "Ettoregia" <et...@gmail.com> wrote:

> Hi all,
>
> from the documentation I saw that when within a Camel route I send a msg on
> a jms destination, with either a replyTo option set or specifying the MEP
> as
> InOut, Camel will then instantiate a jms listener to listen to that
> JMSReplyTo dest.
>
> So far so good, at least if that is correct. My point now is, how can I
> control that listener, I mean when a msg is delivered to my replyTo dest,
> and the listener receives it, how can I get hold of that msg?
>
> On slightly different note, how would you implement a scenario where a
> dynamic replyTo should be used? I mean from  here
> <
> http://camel.465427.n5.nabble.com/set-jms-reply-to-in-message-header-td4420767.html
> >
> I got to know that Camel, and with good reason, does not implement that
> feature, but it seems to me that the replyTo is meaningless then.
>
> If I want to send a msg using a Rest PUT, where a camel rest consumer would
> read it, pass to a processor, and then sent a response back to myself on a
> destination specified by the JMSReplyTo, how'd go with this?
>
> Hopefully all is clear enough.
>
> Kind regards,
> Ettore.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-jms-listener-on-JMSReplyTo-bahaviour-tp5761654.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>