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.
- Even for administrator provisioned endpoints, the Solace Java RTO API 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 Solace Java RTO 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. 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:
- QueueProvision.java for the Solace Java RTO API
Provisioning Durable Endpoints Using the Solace Java RTO API
To dynamically provision a durable endpoint using the Solace Java RTO API, complete the following steps:
-
Create a local API representation of an endpoint.
- For the Solace Java RTO API, this is a queue or endpoint object.
- Pass the object or property list to the appropriate method or function to provision the endpoint or queue on the event broker.
The following shows how to create an API representation of a durable endpoint or queue and provision it on the event broker:
// Create local queue or endpoint object: Solclient.Allocator.newQueue(...) Solclient.Allocator.newTopicEndpoint(...) // Provision the queue or endpoint on the event broker: SessionHandle.provision(...)
For more information, see the Solace Java RTO API reference.
Deprovisioning Durable Endpoints Using the Solace Java RTO 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 a method or function listed in the table below and pass in the endpoint to remove (that is, the object for the Solace Java RTO API) and the provision flags to indicate whether the "deprovisioning" should be done synchronously or asynchronously. For more information, see the Solace Messaging APIs documentation for the Solace Java RTO 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 (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.
To dynamically deprovision durable endpoints, use:
SessionHandle.deprovision(...)
For more information, see the Solace Java RTO API reference.