Provisioning Durable Endpoints

There are two ways that durable Queues or Topic Endpoints can be provisioned on an event broker:

  • An administrator can manually provision a durable endpoint through the Solace CLI or SolAdmin.

    When using the Java, Java RTO, or .NET APIs, which are object-oriented, a client must also create a logical Queue or Topic Endpoint instance to match the provisioned endpoint.

  • In a connected Session, a client can dynamically provision a durable endpoint through the messaging API. To dynamically provision a durable endpoint, call a method or function listed in the table below and pass in endpoint properties and provision flags (refer to Defining Endpoint Properties).

    :  Clients can provision durable endpoints through the API without immediately creating consuming Flows to them.

Related Samples

  • For an example of how to dynamically create durable Queues, refer to the SimpleFlowToQueue sample for the Java, Java RTO, and .NET APIs.
  • For an example of how to dynamically create durable Topic Endpoints, refer to the SimpleFlowToTopic sample for the Java, Java RTO, and .NET APIs.

Creating Durable Endpoint Instances

To create durable endpoint instances when using the Java, Java RTO, or .NET APIs, call one of the following methods.

To Create Durable Endpoint Instances

Language

Call

Java

  • JCSMPFactory.createQueue(String)

  • JCSMPFactory.createDurableTopicEndpoint(String)

Java RTO

  • Solclient.Allocator.newQueue(...)

  • Solclient.Allocator.newEndpoint(...)

C

Not applicable

.NET

  • ContextFactory.CreateQueue()

  • ContextFactory.CreateDurableTopicEndpointEx()

JavaScript and Node.js

Not applicable

Dynamically Provisioning Endpoints

To dynamically provision a durable endpoint, call a method or function listed below and pass in endpoint properties and provision flags.

Java, Java RTO, and .NET APIs

When dynamically provisioning an endpoint using the Java, Java RTO, or .NET messaging APIs, a client must first create an in-memory instance of a provisioned Queue or Topic Endpoint (refer to Creating Durable Endpoint Instances). The instance is then passed in as a parameter when provisioning the endpoint.

To Dynamically Provision Endpoints

Language

Call

Java

JCSMPSession.provision(...)

Java RTO

SessionHandle.provision(...)

C

solClient_session_endpointProvision(...)

.NET

ISession.Provision(...)

JavaScript and Node.js

Not applicable

Removing Durable Endpoints

Durable endpoints can be removed in two ways:

  • An administrator can remove a durable endpoint on an event broker through the Solace CLI or SolAdmin.
  • In a connected Session, a client can remove a durable endpoint that was provisioned through the API, as follows: Call a method or function listed in the table below and pass in the endpoint to remove (that is, the object for the Java, Java RTO, and .NET APIs, or the endpoint name and type for the C API) and the provision flags to indicate whether the “deprovisioning” should be done synchronously or asynchronously (refer to the APIs & Protocols documentation or the appropriate messaging API).

:  A client can only remove an endpoint if it originally provisioned the endpoint (that is, if it is the owner of the endpoint) or if the endpoint is provisioned with Delete permission level, which allows other clients to remove the endpoint (refer to Defining Endpoint Properties).

To Dynamically Remove Durable Endpoints

Language

Call

Java

JCSMPSession.deprovision(...)

Java RTO

SessionHandle.deprovision(...)

C

solClient_session_endpointDeprovision(...)

.NET

ISession.Deprovision(...)

JavaScript and Node.js

Not applicable