[General] how should Dubbo handle non-Dubbo Spring Cloud instances in Nacos? #16126
onceMisery
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-check
Apache Dubbo Component
Java SDK (apache/dubbo)
Details
Hi Dubbo community,
I would like to start a discussion about the behavior described in Issue #16108
Background
When Spring Cloud services and Dubbo services are registered in the same Nacos namespace, a Dubbo consumer may discover Spring Cloud instances that do not contain valid Dubbo metadata. In this case, Dubbo currently tries to build invokers from those instances and may finally throw an "Unsupported protocol" / "Cannot create invokers" exception.
Current issue
From my investigation, the problem is related to the interaction between Spring Cloud service instance customization and Dubbo metadata matching:
Expected behavior
My expectation is that if a discovered instance is not a real Dubbo provider and does not contain valid Dubbo service metadata for the consumer, Dubbo should skip it gracefully instead of throwing an exception. The consumer should continue waiting for actual Dubbo provider instances.
Proposed direction
My current fix idea is to make the matching/filtering logic stricter so that non-Dubbo Spring Cloud instances are excluded earlier during service matching, especially when the consumer protocol is not explicitly specified.
Draft PR
I have prepared a draft change here for reference: onceMisery#1
Questions for the community
Any feedback is appreciated. After consensus, I will update the implementation accordingly and prepare the formal PR.
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions