See the full example here
Using service registration and discovery is very simple. In fact, it only requires two additional lines of code compared to point-to-point calls. Before using this feature, we need to install the relevant registry client. Currently, Dubbo-python only supports Zookeeper
, so the following demonstration will use Zookeeper
.
Similar to before, we need to clone the Dubbo-python source code and install it. However, in this case, we also need to install the Zookeeper
client. The commands are:
After that, simply start Zookeeper
and insert the following code into your existing example:
This enables service registration and discovery within your Dubbo-python project.