Bladex 2.8 对接redis Sentinel 需要做什么修改,可以继续使用 BladeRedis?

Blade 已结 1 791

为了保证项目线上整体高可用。改造Redis为哨兵集群模式(3个redis,3个哨兵)
不知道咱们框架对接Redis的 Sentinel哨兵配置文件修改要点是什么?是否还需要额外的配置选项?

1条回答
  •  admin
    admin (最佳回答者)
    2021-05-12 21:39

    配置这块没有做过改动,按照springboot原生方式对接就行。

    作者追问:2021-05-12 21:39

    经过测试Bladex 2.8 配置了 Redis的Sentinel哨兵配置还是报错无法使用。
    但是使用:https://github.com/chanjarster/spring-boot-redis-sentinel-example
    这个项目下代码,配置文件改为我的本地环境,是可以正常连接使用的。


    spring:
      redis:
        password: 123456
        sentinel:
          master: mymaster
          nodes:
            - slave1:7601
            - slave1:7602
            - slave1:7603


    0 讨论(1)
提交回复