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 CLI, or SolAdmin.
- Even for administrator provisioned endpoints, the Solace .NET API, which is object-oriented, requires you to create a logical queue or topic endpoint instance to use when creating a consumer flow.
- In a connected session, a client can dynamically provision a durable endpoint through the messaging API. To dynamically provision a durable endpoint, call the method listed below 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:
- QueueConsumer.cs for the Solace .NET API
Provisioning Durable Endpoints Using the Solace .NET API
To dynamically provision a durable endpoint using the Solace .NET API, complete the following steps:
- Create a local API representation of an endpoint as a queue or endpoint object.
- Pass the object to the appropriate method to provision the endpoint or queue on the event broker.
In the Solace .NET API, use:
// Create local queue or endpoint object:ContextFactory.CreateQueue(...)ContextFactory.CreateDurableTopicEndpointEx(...)// Provision the queue or endpoint on the event broker:ISession.Provision(...)
For more information, see the Solace Messaging API for .NET reference.
Deprovisioning Durable Endpoints Using the Solace .NET 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 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 method listed below and pass in the endpoint object to remove and the provision flags to indicate whether the "deprovisioning" should be done synchronously or asynchronously.
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.
In the Solace .NET API, use:
ISession.Deprovision(...)
For more information, see the Solace Messaging API for .NET reference.