Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Coding Messaging Client Applications | JMS Request-Reply Application with a Message Selector | Application Code | Using a Temporary Queue
 
Using a Temporary Queue
JMS applications typically use temporary queues to store messages that are only needed for the duration of a session. As soon as the session ends, messages on the temporary queue are deleted.
The requestor application in this example uses a temporary queue to store reply messages. The following lines of code demonstrate the usage of a temporary queue for reply messages:
MessageConsumer receiver;
Queue replyQueue;
 
...
replyQueue = session.createTemporaryQueue();
receiver = session.createConsumer(replyQueue);