Here we provide an example demonstrating how to implement intercommunication between dubbo-java and dubbo-go using the triple protocol. The complete source code can be viewed here.
The main content of the example is as follows:
The shared service definition is as follows. Please pay attention to the specific definitions of package
, go_package
, and java_package
:
After running the above command, the go server runs on port 50052. You can test if the service runs normally with the following command:
Run the following command to start the java client and see the service call output from the go server:
Run the following command to start the java server:
Note: Please close the previously started go server to avoid port conflict.
You can test if the service runs normally with the following command:
Run the following command to start the go client and see the service call output from the java server: