Pulsar Manager is a web-based GUI management and monitoring tool that helps administrators and users manage and monitor tenants, namespaces, topics, subscriptions, brokers, clusters, and so on, and supports dynamic configuration of multiple environments.
The figure above illustrates how does Pulsar Manager work and how it manages multiple Pulsar environments. The Pulsar Manager comprises two parts: frontend and backend.
Development tools used in the backend are listed below:
The code structure of the backend is shown below.
Restful API defines the specification. If the RESTful API needs backend processing, it needs to be prefixed with pulsar-manager. If you want to directly forward the request to the broker, you can directly define it according to the specification of Pulsar RESTful API.
Let's take a new tenant as an example to illustrate how to develop the Pulsar Manager project.
Restful API that requires backend processing
GET /pulsar-manager/admin/v2/tenants
Restful API directly forwarded to a broker
PUT /admin/v2/tenants/{tenantName}
Service is used to implement business logic and add interface. Here, the TenantsService
interface is added under the service folder.
Here, aggregate data queried from brokers.
Add a TenantsController
file under the controller folder to add an API to obtain the tenant list. In the following class you can add some description information, error response, etc.
The frontend is developed based on vue-element-admi and Element. The development of the frontend is here.
The frontend code structure is shown as above.
The RESTful interface is defined in the api
folder.
Add a new page here. For example, this is a tenant page. )
You can add multiple languages to the corresponding configuration folder under the lang
folder.