James.Strachan wrote:
> 
> I still don't quite follow why you need to use a temporary queue - you
> could just use a real queue and send around Strings so anyone can send
> to component 3.
> 
> By all means use the string constructor for ActiveMQTempQueue - though
> be very careful to keep them very unique - and there could be bugs you
> hit consuming from a temporary queue without actually using the
> createTemporaryQueue() method.
> 

In my usecase nobody is actually sending jms messages to component 3. 
Component 3 polls an external system for replies to messages that were sent
to the external system from component 2.  Component 1 is the one that
actually creates the temporary queue using the createTemporaryQueue()
method, sets it into the replyTo field and sends the message to component 1. 
Component 1 then waits for a reply.  Component 3 having recieved a reply
from an external system, then needs to send a jms message with a formatted
reply to Component 1's temporary queue.  Since Component 3 never "saw" the
original jms request message, it has to do something other then
message.getJMSReplyTo() in order to connect to the temp queue.

As i was writing this I started to get a little confused my self :) Hope it
makes sense.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Working-with-temporary-queues-tf2944057.html#a8286922
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to