aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JMS asynchronous messaging with temporary queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS asynchronous messaging with temporary queue" Watch "JMS asynchronous messaging with temporary queue" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS asynchronous messaging with temporary queue
 
Similar Threads
regarding Point-to-Point messaging system
Query rgarding JMS
which technology better for file transferring
JMS - (A)synchronous ?!?
JMS - rollback but no redelivery