Dubbo 框架还默认提供了 redis、etcd、consul 等元数据中心适配实现
Redis 实现由主干库提供内置实现,但需要增加以下依赖:
<dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.10.0</version>
</dependency>
</dependency>
dubbo
metadata-report
address: redis://127.0.0.1:1111
或者
dubbo.metadata-report.address=redis://127.0.0.1:1111
增加依赖:
<dependency>
<groupId>org.apache.dubbo.extensions</groupId>
<artifactId>dubbo-metadata-report-etcd</artifactId>
<version>3.3.0</version>
</dependency>
调整配置:
dubbo
metadata-report
address: etcd://127.0.0.1:1111
增加依赖:
<dependency>
<groupId>org.apache.dubbo.extensions</groupId>
<artifactId>dubbo-metadata-report-consul</artifactId>
<version>3.3.0</version>
</dependency>
调整配置:
dubbo
metadata-report
address: consul://127.0.0.1:1111