setting spring data jedis connection pool using application.yml file

2.4k views Asked by At

We are using spring data redis. Below mentioned are property for sentinel configuration

spring.redis.sentinel.master: globalsessions_dev
spring.redis.sentinel.nodes: sentinel01.stage.shutterfly.com:26379,sentinel02.stage.shutterfly.com:26379,sentinel03.stage.shutterfly.com:26379

We would like to use connection pool also to be configured in same manner. Spring redis documentation does not provide details of connection pool yml property.

Thanks in advance.

1

There are 1 answers

0
landbit On
spring:
    profiles: live
    redis:
        sentinel:
            master:
            nodes:  
        host: 192.168.1.1000
        port: 6379
        password: 
        pool:
            max-wait: -1
            max-active: -1
            max-idle: -1
            min-idle: 16

You could also use Spring tool suite, it has nice autocompletion of yaml properties ;)