-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java interop - triple protocol-java -go #730
Conversation
if err != nil { | ||
panic(err) | ||
} | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz remove no used code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,i will change it
<groupId>org.apache.dubbo</groupId> | ||
<artifactId>dubbo-compiler</artifactId> | ||
<version>${dubbo.version}</version> | ||
<mainClass>org.apache.dubbo.gen.tri.Dubbo3TripleGenerator</mainClass> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz remove the generated codes and add a readme to tell people how to generate them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added instructions on how to generate proto in the README.
* Implement rpc-triple with pb and pb2 * Add integrate test for rpc/triple/pb(2) * Remove README * Update dubbo-go to v3.2.0-rc1
* feat: add nacos as config_center example * add nacos test * fix: add configuration with nacos sdk * add zookeeper * add readme * fix: add license * fix: "err" shadows declaration * fix: add zookeeper in integrate test * fix: use raw sdk instead of config package * fix: zk * fix: fmt
Signed-off-by: YarBor <[email protected]>
Signed-off-by: YarBor <[email protected]>
Signed-off-by: YarBor <[email protected]>
@@ -0,0 +1 @@ | |||
mvn -e clean compile exec:java -Dexec.mainClass="org.apache.dubbo.sample.Provider" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use mvn wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/apache/dubbo-samples/tree/master/11-quickstart
check mvn wrapper configuration in this directory.
|
||
DubboBootstrap bootstrap = DubboBootstrap.getInstance(); | ||
bootstrap.application(new ApplicationConfig("java-go-sample-server")) | ||
.registry(new RegistryConfig("zookeeper://127.0.0.1:2181")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry is not mandatory for this case
ref.setTimeout(3000); | ||
bootstrap.application(new ApplicationConfig("duboo-test")) | ||
.registry(new RegistryConfig("zookeeper://127.0.0.1:2181")) | ||
.protocol(new ProtocolConfig(CommonConstants.TRIPLE,50052)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protocol is not needed for consumer, remove this line please
ref.setProxy(CommonConstants.NATIVE_STUB); | ||
ref.setTimeout(3000); | ||
bootstrap.application(new ApplicationConfig("duboo-test")) | ||
.registry(new RegistryConfig("zookeeper://127.0.0.1:2181")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry is not necessary for this case, better use ref.setUrl("tri://ip:port")
instead.
dubbo.WithName("org.apache.dubbo.sample.GreeterImpl"), | ||
dubbo.WithRegistry( | ||
registry.WithZookeeper(), | ||
registry.WithAddress("127.0.0.1:2181"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
services: | ||
GreeterConsumer: | ||
# interface is for registry | ||
interface: org.apache.dubbo.demo.GreeterImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file still needed? I think we don't need this file anymore with the new API. Please confirm if we can delete this file.
services: | ||
GreeterProvider: | ||
# interface is for registry | ||
interface: org.apache.dubbo.demo.GreeterImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm if we can delete this file.
<artifactId>dubbo-dependencies-zookeeper-curator5</artifactId> | ||
<type>pom</type> | ||
<version>${dubbo.version}</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this dependency after registry
configuration removed.
<artifactId>dubbo-dependencies-zookeeper-curator5</artifactId> | ||
<type>pom</type> | ||
<version>${dubbo.version}</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this dependency
plz add integrate test for this case |
You can test it by following the instructions in the README. |
#699