Show TOC Start of Content Area

Procedure documentation Creating Temporary Destinations Locate the document in its SAP Library structure

Use

You can dynamically create destinations that last as long as the lifetime of the connection, known as temporary destinations. Consumers of temporary destinations can be created only from the same connection that created the destination.

The temporary destinations:

      Are intended to facilitate a simple request/reply mechanism.

      Represent a message queue or topic to which a producer can send and from which a consumer can receive messages.

      Exist only for the lifetime of the connection in which they are created.

      Are deleted when the connection is closed, and all messages inside the destination are lost.

      Are not intended to survive a server failure.

      Only consumers created in the same connection as the temporary destination can receive messages from it, although all producers can send messages to it.

This graphic is explained in the accompanying text

Although you can easily create temporary destinations dynamically without the help of an administrator, they require as many resources on the provider side as regular destinations, so avoid using temporary destinations extensively.

Procedure

Use the following source code:

This graphic is explained in the accompanying text

// create a new temporary queue

Queue queue = session.createTemporaryQueue();

// create a new temporary topic

Topic topic = session.createTemporaryTopic();

 

End of Content Area