| Author |
JMS asynchronous messaging with temporary queue
|
Siva Vulchi
Ranch Hand
Joined: Nov 17, 2011
Posts: 30
|
|
Is it possible to use Temporary queue (for using as response queue by setting Message's JMSReplyTo property) in JMS asynchronous messaging?
Siva
|
 |
Prabhakar Reddy Bokka
Ranch Hand
Joined: Jul 26, 2005
Posts: 189
|
|
|
Yes. you can definitely have 2 queues in which one for receiving a message, and based on message received you send a response message to second queue. But there is no temporary queue.
|
SCJP 5, SCWCD 5
|
 |
Siva Vulchi
Ranch Hand
Joined: Nov 17, 2011
Posts: 30
|
|
Prabhakar,
Thanks for the reply..
But i wanted to know the possibility of using Temporary queue in JMS asynchronous messaging. As per my investigation, it is found that Temporary queues are used only in synchronous messaging.
Siva
|
 |
Prabhakar Reddy Bokka
Ranch Hand
Joined: Jul 26, 2005
Posts: 189
|
|
But i wanted to know the possibility of using Temporary queue in JMS asynchronous messaging.
What do you mean by temporary queue? do you mean virtual queue? then where do you want to create? how do you want to use it?
explaining your requirement could help in thinking of possibilities
|
 |
Siva Vulchi
Ranch Hand
Joined: Nov 17, 2011
Posts: 30
|
|
Temporary queues(or Virtual queues) are created in the server by client. And they exist as long client session exists.
And my question has been clarified.. Moving it to Resolved state.
|
 |
Prabhakar Reddy Bokka
Ranch Hand
Joined: Jul 26, 2005
Posts: 189
|
|
Please post the clarification you have got. Also helpful if you can share the links regarding to that.
|
 |
Siva Vulchi
Ranch Hand
Joined: Nov 17, 2011
Posts: 30
|
|
As per my investigation, it is found that Temporary queues are used only in synchronous messaging.
As Temporary queues exist as long client session exists, they cant be used in asynchronous messaging.
I did not save the any referred links. And my apologies for that
|
 |
Graham Hunter
Greenhorn
Joined: Nov 10, 2012
Posts: 1
|
|
As Temporary queues exist as long client session exists, they cant be used in asynchronous messaging.
Sorry, this is completely untrue. The JMS QueueSession object has a createTemporaryQueue() method and in conjunction with the jmsReplyTo message header and MessageListener.onMessage() it enables asynchronous request/response processing.
These two articles are very helpful in getting this working correctly, and the first even points out the strengths and weaknesses of this approach:
http://onjava.com/pub/a/onjava/2007/04/10/designing-messaging-applications-with-temporary-queues.html
http://javaxcross.blogspot.com/2008/06/jms-sendreponse-implementation.html
|
 |
 |
|
|
subject: JMS asynchronous messaging with temporary queue
|
|
|