!--a11y-->
Creating Temporary Queues 
The session object provides the functionality for creating temporary queues (destinations that last as long as the lifetime of the session). Consumers of temporary destinations can be created from the same connection that created the destination only.
The javax.jms.QueueRequestor class demonstrates how you use temporary destinations.
The QueueRequestor class provides a request method that simplifies service request making. This class creates a TemporaryQueue for the responses and enables you to send messages and wait for a reply. Indeed, this is a basic request/reply abstraction.
The temporary queue only lasts for the duration of the connection in which you created it.
The QueueRequestorrequires a Queue destination and non-transacted QueueSession object.
Use the following source code to create a QueueRequestor:

QueueRequestor queueRequestor = new QueueRequestor(queueSession, queue); |
For an example, see Message Processing: Confirmation in a Temporary Queue.
