-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e276c8
commit 943f5e2
Showing
21 changed files
with
420 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: "元数据中心" | ||
linkTitle: "元数据中心" | ||
weight: 2 | ||
--- | ||
|
||
|
||
{{< notice tip >}} Dubbo 元数据中心仅适用于北极星服务端版本 >= 1.18.0 {{< /notice >}} | ||
|
||
## Dubbo 分类 | ||
|
||
Dubbo当前常用的有2个分支版本,一个是apache dubbo(GroupID是org.apache.dubbo), 一个是dubbox (GroupID是com.alibaba)。两个分支的dubbo,对应不同的接入插件,大家接入之前可以先通过GroupID判断下当前项目依赖的是哪个分支的dubbo。 | ||
|
||
|
||
## Apache Dubbo 接入 | ||
|
||
### 支持版本 | ||
|
||
- dubbo 3.x 版本的接入,最新版本为 ```0.2.0-3.2.7``` | ||
|
||
### 引入依赖 | ||
|
||
在 pom.xml 中引入以下依赖 | ||
|
||
```xml | ||
<!-- 北极星注册发现插件 --> | ||
<dependency> | ||
<groupId>com.tencent.polaris</groupId> | ||
<artifactId>dubbo-registry-polaris</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
<!-- 北极星元数据中心插件 --> | ||
<dependency> | ||
<groupId>com.tencent.polaris</groupId> | ||
<artifactId>dubbo-metadatareport-polaris</artifactId> | ||
<version>${revision}</version> | ||
</dependency> | ||
``` | ||
|
||
### 参数配置 | ||
|
||
接下来,需要添加北极星 metadata-report 的配置,指定北极星的地址及相关配置信息,可以通过配置文件及代码的方式进行指定: | ||
|
||
配置文件方式添加: | ||
|
||
```properties | ||
dubbo.metadata-report.address=polaris://127.0.0.1:8091 | ||
``` | ||
|
||
北极星地址的URL支持通过参数指定可选的配置,具体参数列表如下: | ||
|
||
| 参数 | 类型 | 含义 | | ||
|-----------|--------|------------------| | ||
| namespace | string | 指定服务的命名空间 | | ||
| token | string | 指定用户token | | ||
|
||
### 结果验证 | ||
|
||
#### 服务接口定义 | ||
|
||
服务契约名称格式样例 | ||
|
||
``` | ||
"name": "dubbo::metadata::dubbo-provider::2e2e13eddf24272edcaa60c34afc5067", | ||
"namespace": "dubbo", | ||
"service": "dubbo-provider", | ||
"protocol": "dubbo", | ||
"version": "", | ||
"revision": "2e2e13eddf24272edcaa60c34afc5067", | ||
``` | ||
|
||
 | ||
|
||
#### 服务接口运维数据 | ||
|
||
服务契约名称格式样例 | ||
|
||
``` | ||
"name": "dubbo::metadata::1.0.0::provider::dubbo-provider", | ||
"namespace": "dubbo", | ||
"service": "dubbo-provider", | ||
"protocol": "dubbo", | ||
"version": "1.0.0", | ||
"revision": "d297643d19dc4700a8c11d7fd57ef808", | ||
``` | ||
|
||
 | ||
|
||
#### 接口-应用映射 | ||
|
||
服务契约名称格式样例 | ||
|
||
``` | ||
"name": "dubbo::mapping::com.tencent.polaris.dubbo.api.HelloService", | ||
"namespace": "dubbo", | ||
"service": "", | ||
"protocol": "dubbo", | ||
"version": "", | ||
"revision": "f31bc6a132c84ce9afc39c1b98fdb6a7", | ||
``` | ||
|
||
查询该接口下有多少应用提供了该接口 | ||
|
||
```json | ||
{ | ||
"@type": "type.googleapis.com/v1.ServiceContract", | ||
"id": "535e686a7e8707b1d53e63f7578e80a2a94e4747", | ||
"name": "dubbo::mapping::com.tencent.polaris.dubbo.api.HelloService", | ||
"namespace": "dubbo", | ||
"service": "", | ||
"protocol": "dubbo", | ||
"version": "", | ||
"revision": "f31bc6a132c84ce9afc39c1b98fdb6a7", | ||
"content": "", | ||
"interfaces": [ | ||
{ | ||
"id": "6be61ef353a9e1918d5b84c100db0c8a5637f5a5", | ||
"name": "dubbo-provider" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+202 KB
.../docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-application-instance-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+229 KB
...docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-application-interface-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+238 KB
...n/docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-application-service-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+192 KB
...cn/docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-interface-instance-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+202 KB
...h-cn/docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-interface-method-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+172 KB
...-cn/docs/使用指南/java应用开发/dubbo/图片/circuitbreaker/dubbo-interface-service-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+180 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/configcenter/dubbo-config-publish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+183 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/configcenter/dubbo-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+125 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/discovery/dubbo-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+133 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/discovery/dubbo-interface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+130 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/metadata/dubbo-interface-admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+95.6 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/metadata/dubbo-interface-def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+107 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/ratelimit/dubbo-application-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+284 KB
content/zh-cn/docs/使用指南/java应用开发/dubbo/图片/ratelimit/dubbo-interface-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.