Questions tagged [jedis]

Jedis is a small free client for Redis, written in and for Java.

From its GitHub repository:

Jedis is a Java client for Redis designed for performance and ease of use.

Resources

868 questions
3
votes
1 answer

Usage of the JedisPoolConfig parameter *blockWhenExhausted*

So I have a project where I'm using the Spring-Data-Redis to cache some data. The Spring-Data-Redis is setup with Jedis using Bean Configuration. I looked for the JedisPoolConfig parameters that can be modified to control the behavior of my Caching…
Sulaiman Adeeyo
  • 485
  • 6
  • 19
3
votes
1 answer

Redis Cluster Configuration

I am using spring redisTemplate(jedis, 2.0.0) with redis-server(2.9.50). It's working perfectly for the single instance but I want to create a cluster master-slave environment with two different instances in which replication and failover happen…
Himanshu Arora
  • 688
  • 1
  • 9
  • 20
3
votes
1 answer

redis It seems like server has closed the connection

i want to use redis sub/pub, but when i subscribe one channel, 2 minutes after,console output Exception: It seems like server has closed the connection. redis version:redis-3.0.3 jedis version:2.3.0 os:OS X Yosemite 10.10.5 Subscribe.class …
jonnyLee
  • 41
  • 1
  • 5
3
votes
2 answers

Java proxy for Autocloseable (Jedis resources)

I am trying to find out whether it is possible to create Java dynamic proxy to automatically close Autocloseable resources without having to remember of embedding such resources with try-resources block. For example I have a JedisPool that has a…
Konrad
  • 1,605
  • 3
  • 24
  • 45
3
votes
1 answer

How to enable notify-keyspace-events on Redis Cloud for Heroku app?

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); …
Kolli
  • 41
  • 6
3
votes
1 answer

Usage of Redis for very large memory cache

I am planning to consider Redis for storing large amount of data in cache. Currently I store them in my own cache written in java. My use case is below. I get 15 minutes data from a source and i need to aggregate the data hourly. So for a given…
Bankelaal
  • 408
  • 1
  • 9
  • 24
3
votes
1 answer

Jediscluster with Object pool

I am new to Jedis, found here I want to make pool of JedisCluster objects, using the constructor found as: public JedisCluster(Set nodes, final GenericObjectPoolConfig poolConfig) { this(nodes, DEFAULT_TIMEOUT,…
Ankur Verma
  • 5,793
  • 12
  • 57
  • 93
3
votes
2 answers

JedisMovedDataException (When using sadd with pipeline)

I have a 3 node EC2 redis cluster setup and I am trying to add records to redis (using sadd) with pipeline mode. I get the following error after adding about 70/82 and 81 keys in 3 nodes: Exception in thread "main"…
user3476359
  • 430
  • 6
  • 11
3
votes
2 answers

Spring Data Redis with cluster support

I want to use Spring Data Redis with my clustered setup of Redis. Now in a pure code of Jedis to connect to the cluster of Redis nodes we have to do like: Set jedisClusterNodes = new HashSet(); …
Ankur Verma
  • 5,793
  • 12
  • 57
  • 93
3
votes
4 answers

spring data redis master slave config

Following is my jedis config @Bean public JedisConnectionFactory getJedisConnectionFactory() { JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(); jedisConnectionFactory.setUsePool(true); return…
hrishikeshp19
  • 8,838
  • 26
  • 78
  • 141
3
votes
3 answers

need some advice with "increment" in "jedis"

Tested with jedis 2.6.1 and 2.6.2. redisTemplate.opsForHash().put("mykey", "myhashkey", 1); 127.0.0.1:6379> hkeys "mykey" 1) "\xac\xed\x00\x05t\x00\tmyhashkey" 127.0.0.1:6379> hget "mykey"…
Alex
  • 967
  • 4
  • 15
  • 38
3
votes
0 answers

How to handle asynchronous query to a redis server using one connection?

I'm now developing a redis client for swift. I tried to use asynchronous callback delegate to handle to result sent from the redis server using: func stream(aStream: NSStream, handleEvent eventCode: NSStreamEvent) But every time I will open a new…
3
votes
1 answer

Can I listen event on lpush operation of Redis?

I am using Jedis java client for redis. My requirement is that when someone add item to list, say mylist by doing jedisClient.lpush("mylist", "this is my msg"), I need to get notification. Is this possible ?
Bhushan
  • 1,489
  • 3
  • 27
  • 45
3
votes
2 answers

Redis iterate over key groups

I'm would like to check that all my keys in redis are correct. I'm storing the keys in groups like so: userid:fname userid:lname userid:age ... I would like to iterate over the them by grouping them by userid and then check each group from fname,…
Amir Rossert
  • 1,003
  • 2
  • 13
  • 33
3
votes
1 answer

How do we come to know that the watch has failed in Redis

I have one scenario where I want to log the key for which the watch failed. This is a java application. Following is the sequence of the statements in my code - Multi Watch Hmget exec and following is the code - for (String key : coreKeys) { …
user1305398
  • 3,550
  • 5
  • 26
  • 42