Service Management Commands

Service Management Commands

The service management feature provides a series of commands to manage Dubbo services.

Service Management

ls Command

List Consumers and Providers

dubbo>ls
As Provider side:
+------------------------------------------------------------------------+---------------------+
|                          Provider Service Name                         |         PUB         |
+------------------------------------------------------------------------+---------------------+
|DubboInternal - UserRead/org.apache.dubbo.metadata.MetadataService:1.0.0|                     |
+------------------------------------------------------------------------+---------------------+
|               com.dubbo.dubbointegration.UserReadService               |nacos-A(Y)/nacos-I(Y)|
+------------------------------------------------------------------------+---------------------+
As Consumer side:
+-----------------------------------------+-----------------+
|          Consumer Service Name          |       NUM       |
+-----------------------------------------+-----------------+
|com.dubbo.dubbointegration.BackendService|nacos-AF(I-2,A-2)|
+-----------------------------------------+-----------------+

This command lists the services provided and consumed by Dubbo, as well as the number of addresses for the consumed services.

Online

online Command

Command to bring services online.

When using delayed publishing (by setting org.apache.dubbo.config.AbstractServiceConfig#register to false), to bring services online later, you can use the Online command.

// Bring all services online
dubbo>online
OK

// Bring some services online based on regex
dubbo>online com.*
OK

Offline

offline Command

Command to take services offline.

If services need to be temporarily taken offline due to failure or other reasons, use the Offline command.

// Take all services offline
dubbo>offline
OK

// Take some services offline based on regex
dubbo>offline com.*
OK