My project is using Redis (Jedis client) as cache manager. here is bean i use to manipulate connection to redis cluster
@Bean(destroyMethod = "close") @ConditionalOnProperty(value = "spring.cache.type", havingValue = "redis") public JedisCluster jedisCluster(@Value("${spring.redis.host}") String host, @Value("${spring.redis.port}") int port, @Value("${spring.redis.password}") String password) { Set<HostAndPort> jedisClusterNode = new HashSet<>(); jedisClusterNode.add(new HostAndPort(host, port)); JedisPoolConfig defaultConfig = new JedisPoolConfig() return new JedisCluster(jedisClusterNode, DEFAULT_TIMEOUT, DEFAULT_TIMEOUT, DEFAULT_REDIRECTIONS, kcService.getKey(password), "lhs_redis", defaultConfig); }
Now i want to use pub/sub feature of Redis, base on this link https://medium.com/@bhanuchaddha/using-redis-pub-sub-with-spring-boot-ea0d7a8c27af look like they can do for standalone redis.
So anybody know how to set up Pub/Sub for Redis cluster ?
thanks