diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java index 59d2dcb874e..f9d7833730b 100644 --- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java +++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java @@ -115,6 +115,9 @@ private void init(MetadataReportConfig config, MetadataReportFactory metadataRep private String getRelatedRegistryId(MetadataReportConfig config, URL url) { String relatedRegistryId = config.getRegistry(); + if (isEmpty(relatedRegistryId)) { + relatedRegistryId = config.getId(); + } if (isEmpty(relatedRegistryId)) { relatedRegistryId = DEFAULT_KEY; }