• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS asynchronous messaging with temporary queue

 
Siva Vulchi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Siva Vulchi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the clarification you have got. Also helpful if you can share the links regarding to that.
 
Siva Vulchi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic