WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

Temporary destinations

XMS applications can create and use temporary destinations.

An application typically uses a temporary destination to receive replies to request messages. To specify the destination where a reply to a request message is to be sent, an application calls the Set JMSReplyTo method of the Message object representing the request message. The destination specified on the call can be a temporary destination.

To create a temporary destination, a C application calls the xmsDestCreateTemporaryByType() function. As parameters on the call, the application specifies the handle for the session in which the temporary destination is being created and the type of temporary destination, which is either a queue or a topic.

A C++ application creates a temporary queue by calling the createTemporaryQueue() method of a Session object, and creates a temporary topic by calling the createTemporaryTopic() method of a Session object.

Although a session is used to create a temporary destination, the scope of a temporary destination is actually the connection that was used to create the session. Any of the connection's sessions can create message producers and message consumers for the temporary destination. The temporary destination remains until it is explicitly deleted, or the connection ends, whichever is the sooner.

When an application creates a temporary queue, a queue is created in the messaging server to which the application is connected. If the application is connected to a queue manager, a dynamic queue is created from the model queue whose name is specified by the XMSC_WMQ_TEMPORARY_MODEL property, and the prefix that is used to form the name of the dynamic queue is specified by the XMSC_WMQ_TEMP_Q_PREFIX property. If the application is connected to a service integration bus, a temporary queue is created in the bus, and the prefix that is used to form the name of the temporary queue is specified by the XMSC_WPM_TEMP_Q_PREFIX property.

When an application that is connected to a service integration bus creates a temporary topic, the prefix that is used to form the name of the temporary topic is specified by the XMSC_WPM_TEMP_TOPIC_PREFIX property.

Related concepts
Topic uniform resource identifiers (URIs)
Queue uniform resource identifiers (URIs)
Related reference
Destination (for the C class)
Destination (for the C++ class)
IDestination (for the .NET interface)
Properties of Destination

Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.