You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by monztech <da...@monztech.com> on 2015/11/06 19:27:22 UTC

JMS replyTo always on Queue? (ignores "topic:" in dest param)

Using Camel 2.16.0

We are trying to configure a request/response using JMS topics as both the
request and reply destinations.  This is the route where we are seeing an
issue: 

      rest("/apply")
                .get("applicant/{id}")
               
.to("jms:topic:T.Applicant?replyTo=topic:T.CreateApplicantResponse");

The are some other topics/queues configured but the ultimate destination
does receive the request and is able to send the reply.

The route shown above does receive the expected response, so everything
works with one small exception.  When monitoring Tibco EMS  we see that the
response goes on a *queue*  with the name T.CreateApplicantResponse and not
a topic.  It appears that the "topic:" prefix in the replyTo is either being
ignored or we are not specifying a topic correctly.

After some investigation into the Camel source code I see that in
org.apache.camel.component.jms.JmsProducer  createReplyManager() method the
ReplyManager is hard-coded to use a QueueReplyManager (there is no
TopicReplyManager class as far as I can tell.)

I see some posts on this forum that suggest that topics for replyTo
destinations has been implemented but, I may be interpreting them
incorrectly. 

Should I be able to use a topic as a JMS replyTo?  If so, please advise on
how to configure.

This is our first major effort using camel and we are very pleased with it
thus far.  

Thank you.




--
View this message in context: http://camel.465427.n5.nabble.com/JMS-replyTo-always-on-Queue-ignores-topic-in-dest-param-tp5773459.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS replyTo always on Queue? (ignores "topic:" in dest param)

Posted by smalik <sa...@rabobank.com>.
Thinking about the problem in another way (and assuming request-reply on
topic not possible) - how best to mark an exchange as incomplete until
another JMS message has been received in another queue?

So I am thinking along the lines of having two routes:

Route (1) sending JMS messages to topic, and not marking the exchange as
complete until...
Route (2) receives JMS ack message for the above on another predefined topic
?

So a way to essentially block and wait after the message has been sent on
Route (1), awaiting relevant event on Route (2), only then marking the
exchange on Route (1) as complete.

Any solution I can think of begins to get a bit ugly.. e.g spawning off a
thread after JMS message has been sent to await ack, sending all acks being
received on Route (2) to a concurrent cache, Route(1) checking the cache for
ack after wait time etc.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-replyTo-always-on-Queue-ignores-topic-in-dest-param-tp5773459p5775636.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS replyTo always on Queue? (ignores "topic:" in dest param)

Posted by smalik <sa...@rabobank.com>.
Bumping this up..
We have come across the same problem, trying to get jms replies over a
shared topic working. We are using a vendor application and it is configured
to send replies to our messages over over the one same shared topic - so I
need to listen to that topic for acks to my outgoing messages. 
Please let us know if there is a solution to this in Camel, thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-replyTo-always-on-Queue-ignores-topic-in-dest-param-tp5773459p5775614.html
Sent from the Camel - Users mailing list archive at Nabble.com.