-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
add dubbo-samples-consul demo #73
Comments
@moriadry I added a very basic consul demo: https://github.com/apache/incubator-dubbo-samples/tree/master/dubbo-samples-consul. Feel free to enhance. With this sample, the TCP check works as expected, pls. take a look. |
@beiwei30 yes, I will take a look, thanks. |
the only flaw of TCP check is: if there's no client connected, the provider will keep printing when consul send a TCP request to dubbo's port, which is quite annoying:
|
Hi Ian, it seems the sample works fine. I believe some code in ConsulRegistry.java went wrong, they don't work correctly with the TCP check. you can get correct response because you use the pls check this branch : https://github.com/Moriadry/incubator-dubbo/tree/feature/fordebug with this two different version of ConsulRegistry, and debug ConsulRegistryTest.testSubscribe locally, you will find the difference. you can debug ConsulRegistryTest.testSubscribe.java, make a breakpoint at https://github.com/apache/incubator-dubbo/blob/e2f3346d9d1dff2bf6bf3ac2802e83d46b9923c0/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java#L135 I believe our usage of TCP check is incorrect, we can spend more time on this to figure it out. I'm trying to fix it. I'm on my vocation those days, so it needs a few days. |
Or we can just use http ttl Check, those two checks are both the typical usage provided by consul.io, I believe their robustness can be consider mostly equal :) In case we can't figure this out :( |
@moriadry pls. consider to create a http ttl check pull request, based on my previous change. |
It this the exact change I have merged into the main trunk? |
@moriadry I checked your unit test, since you do not register any service in advanced, isn't it expected an empty list returned? |
@beiwei30 With my uint test, if you use two different consulregistry(tcp and http), getHealthService will return different result(one is empty, one is not, when you register same service again). In your merged version, still use tcp, but lookup URL method without setPassing(true). Let me just create a http-ttl-check pull request anyway. |
Upgrade seata version
how to solve |
add dubbo-samples-consul demo
The text was updated successfully, but these errors were encountered: