Provisioning and Deprovisioning 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 Broker Manager, SEMP, the Solace Event Broker CLI, or SolAdmin.
- In a connected session, a client can dynamically provision a durable endpoint through the Solace C API. To dynamically provision a durable endpoint, call the appropriate function and pass in endpoint properties and provision flags. For more information, see 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 provision durable endpoints, see QueueSubscriber.c for the Solace C API
Provisioning Durable Endpoints Using the Solace C API
To dynamically provision a durable endpoint using the Solace C API, complete the following steps:
- Create a local API representation of an endpoint. This is a list of queue or endpoint properties.
- Pass the property list to the appropriate function to provision the endpoint or queue on the event broker.
Provisioning Durable Endpoints
To create an API representation of a durable endpoint or queue and provision it on the event broker:
// Set local queue or endpoint properties in an array: provisionIndex = 0; provisionProps[provisionIndex++] = ...; // Provision the queue or endpoint on the event broker: solClient_session_endpointProvision(( char ** ) provisionProps, ...)
For more information, see the Solace C API reference.
Deprovisioning Durable Endpoints Using the Solace C API
You can deprovision durable endpoints in two ways:
- An administrator can remove a durable endpoint on an event broker through the Broker Manager, Solace Event Broker CLI, SEMP, or SolAdmin.
- In a connected session, a client can remove a durable endpoint that was provisioned through the API, as follows: Call the function listed below and pass in the endpoint name and type, along with provision flags to indicate whether the deprovisioning should be done synchronously or asynchronously. For more information, see the Solace C API reference.
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 (see Defining Endpoint Properties).
Endpoints created via a management interface (Broker Manager, SolAdmin, CLI or SEMP) can be deprovisioned and deleted only by management. That is, if the endpoint was created by management, it cannot be deprovisioned by a client using an API, regardless of the configured permission.
Deprovisioning Durable Endpoints
To dynamically deprovision durable endpoints, use the function solClient_session_endpointDeprovision(...).
For more information, see the Solace C API reference.