MQCreateTemporaryDestination(const MQSessionHandle sessionHandle MQDestinationType destinationType, MQDestinationHandle * destinationHandle);
MQStatus. See the MQStatusIsError() function for more information.
The handle to the session with which you want to associate this destination.
An enum specifying the destination type, either MQ_QUEUE_DESTINATION or MQ_TOPIC_DESTINATION.
Output parameter for the handle to the newly created temporary destination.
You can use a temporary destination to implement a simple request/reply mechanism. When you pass the handle of a temporary destination to the MQSetMessageReplyTo function, the consumer of the message can use that handle as the destination to which it sends a reply.
Temporary destinations are explicitly created by client applications; they are deleted when the connection is closed. They are maintained (and named) by the broker only for the duration of the connection for which they are created. Temporary destinations are system-generated uniquely for their connection and only their own connection is allowed to create message consumers for them.
For more information, see The Request-Reply Pattern in Sun GlassFish Message Queue 4.4 Technical OverviewChapter 5, Managing a Broker , in Sun GlassFish Message Queue 4.4 Administration GuideChapter 5, Managing a Broker , in Sun GlassFish Message Queue 4.4 Administration GuideChapter 6, Configuring and Managing Connection Services, in Sun GlassFish Message Queue 4.4 Administration GuideChapter 11, Managing Administered Objects, in Sun GlassFish Message Queue 4.4 Administration Guide.