I am using Redis Cloud addon for one of my Heroku java app. I want to listen to key space events from my app. I tried setting the config on Jedis client, but I am not getting any notifications
URI redisUri = new URI(REDIS_CLOUD_URL);
JedisPool pool = new JedisPool(new JedisPoolConfig(),
redisUri.getHost(),
redisUri.getPort(),
Protocol.DEFAULT_TIMEOUT,
redisUri.getUserInfo().split(":",2)[1]);
pool.getResource().getClient().configSet("notify-keyspace-events", "K$");
While using embeded redis server, i do the following and I get the notifications.
RedisServer redisServer = RedisServer.builder().port(6379)
.setting("notify-keyspace-events K$")
.build();
redisServer.start();
I want to set the similar config on Redis Cloud. Is there a CLI to Redis Cloud or a Jedis API to do the same?