Creating Temporary Endpoints

A client can consume Guaranteed messages from a temporary endpoint (a temporary queue or a non-durable topic endpoint). However, a temporary endpoint is non‑durable because it only exists as for as long as the session that it was created in.

Java RTO, C, and .NET APIs

Temporary queues and non‑durable topic endpoints are dynamically provisioned when a flow is created (the flow property SOLCLIENT_FLOW_PROP_BIND_ID sets the endpoint type, and SOLCLIENT_FLOW_PROP_DURABLE sets the endpoint durability).

JavaScript and Node.js APIs

Temporary queues and non-durable topic endpoints are dynamically provisioned when a solace.MessageConsumer is created (the MessageConsumer property queueDescriptor defines the endpoint type and durability).

Related Samples

For an example of how to dynamically create temporary queues, see the SimpleFlowToQueue sample for the Java RTO and .NET APIs.

For an example of how to dynamically create temporary topic endpoints, see the SimpleFlowToTopic sample for the Java RTO and .NET APIs.

For the JavaScript and Node.js APIs, see the GuaranteedReplier and GuaranteedRequestor samples.

To Create Temporary Endpoints

PubSub+ Messaging API Use

Java RTO

For temporary queues:

  • SessionHandle.createTemporaryQueue()

    Creates a temporary queue with an automatically-generated name.

  • SessionHandle.createTemporaryQueue(String name)

    Creates a temporary queue with the given name.

For non-durable Topic Endpoints:

  • SessionHandle.createNonDurableTopicEndpoint()

    Creates a non-durable topic endpoint with an automatically-generated name.

  • SessionHandle.createNonDurableTopicEndpoint
    (String name)

    Creates a non-durable topic endpoint with the given name.

C

solClient_session_createFlow(...)

.NET

For temporary queues:

  • ISession.CreateTemporaryQueue()

    Creates a temporary queue with an automatically-generated name.

  • ISession.CreateTemporaryQueue(String)

    Creates a temporary queue based on the given name.

For non-durable topic endpoints:

  • ISession.CreateNonDurableTopicEndpoint()

    Creates a non-durable topic endpoint with an automatically-generated name.

  • ISession.CreateNonDurableTopicEndpoint(String)

    Creates a non-durable topic endpoint based on the given name.

JavaScript and Node.js

createMessageConsumer ( solace.MessageConsumerProperties | Object consumerProperties )

The MessageConsumerProperties object or the consumerProperties JSON object define durability and the endpoint type.