1

Does Spring Data Redis (1.3.2.RELEASE) support JedisSentinelPool of jedis?

Maybe it doesn't support,who will give me an answer?

If it doesn't support,how should I do?

Andrei Stefan
  • 48,348
  • 5
  • 84
  • 82
Oliver.Liu
  • 33
  • 3

1 Answers1

5

Support for Redis Sentinel is added to Spring Data Redis 1.4. It will be in the upcoming Evans RC1, allowing configuration of JedisConnectionFactory to make use of JedisSentinelPool.

RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration()
  .master("mymaster")
  .sentinel("127.0.0.1", 26379)
  .sentinel("127.0.0.1", 26380);

JedisConnectionFactory factory = new JedisConnectionFactory(sentinelConfig);
factory.afterPropertiesSet();

You can already have a look at the current snapshot build:

compile(group: 'org.springframework.data', name: 'spring-data-redis', version: '1.4.0.BUILD-SNAPSHOT')
Christoph Strobl
  • 5,847
  • 21
  • 30
  • @Christoph Strobl, can you explain this? What are the configuration params with simple configuration? Presently I am using 3 redis sentinels with one master and one slave redis instance. How do i configure the same? – Reddy Jun 01 '15 at 05:27