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

  1. dubbo>ls
  2. As Provider side:
  3. +------------------------------------------------------------------------+---------------------+
  4. | Provider Service Name | PUB |
  5. +------------------------------------------------------------------------+---------------------+
  6. |DubboInternal - UserRead/org.apache.dubbo.metadata.MetadataService:1.0.0| |
  7. +------------------------------------------------------------------------+---------------------+
  8. | com.dubbo.dubbointegration.UserReadService |nacos-A(Y)/nacos-I(Y)|
  9. +------------------------------------------------------------------------+---------------------+
  10. As Consumer side:
  11. +-----------------------------------------+-----------------+
  12. | Consumer Service Name | NUM |
  13. +-----------------------------------------+-----------------+
  14. |com.dubbo.dubbointegration.BackendService|nacos-AF(I-2,A-2)|
  15. +-----------------------------------------+-----------------+

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

Note

  • Services prefixed with DubboInternal are built-in services of Dubbo and are not registered with the registry by default.
  • The first part of the service publishing status nacos-A(Y) represents the corresponding registry name, the second part represents the registration model (A stands for application-level address registration, I stands for interface-level address registration), and the third part indicates whether the corresponding model is registered.
  • The first part of the service subscription status nacos-AF(I-2,A-2) represents the corresponding registry name, the second part represents the subscription model (AF stands for dual subscription mode, FA stands for application-level subscription only, FI stands for interface-level subscription only), the first half of the third part represents the address mode source (A stands for application-level addresses, I stands for interface-level addresses), and the second half represents the corresponding number of addresses.

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.

  1. // Bring all services online
  2. dubbo>online
  3. OK
  4. // Bring some services online based on regex
  5. dubbo>online com.*
  6. 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.

  1. // Take all services offline
  2. dubbo>offline
  3. OK
  4. // Take some services offline based on regex
  5. dubbo>offline com.*
  6. OK

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)