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
-1
votes
1 answer

JedisPooled connection - thread safety

I'm using jedis client to interact with the Redis database. I'm using the code like the following as mentioned here in the docs. I'm reusing the jedisPooled repeatedly in various places to add keys and values. I want to know whether the following…
Anandakrishnan
  • 347
  • 1
  • 4
  • 18
-1
votes
1 answer

Springboot @Cacheable and @EnableRedisRepositories confict

I have reached a conflict situation between Spring @Repository and @Cacheable. I'm using @EnableCaching and have annotated a @Cacheable method. The expectation is that by default, it will create an in-memory cache without any additional…
codetak
  • 1
  • 2
-1
votes
1 answer

Redis using members of sorted list to delete external keys

Using sort one can sort a set and get external keys using results from the sort component of query. By way of example: If the external key/value are defined as various keys using the pattern:itemkey: And a sorted list has list of the …
colinbes
  • 417
  • 6
  • 14
-1
votes
1 answer

java.net.UnknownHostException: "localhost": Name or service not known

I'm trying to connect to Redis in Java using Jedis. I'm doing this simply like return new JedisPool(jedisPoolConfig, redisData.get("address").toString(), redisData.get("port").asInt(), …
J P
  • 541
  • 1
  • 10
  • 20
-1
votes
1 answer

Does Jedis need to know all the cluster IPs to function or can it work with just one and let it figure out the others automatically?

I'm trying to connect to both a single node Redis and Elasticache cluster with the same code base. I am using Jedis raw not via Spring since this is a legacy app and I am setting up Tomcat to use Jedis as a session store. Does Jedis need to know…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
-1
votes
1 answer

jedis correctly manage connections

I have written a class where I have connection pool and pipelined and the way to use this class would be something like (i removed a loop, but setKey would be happening in the loop): private Redis redis = new Redis(); redis.setKey(path,…
Arthur Zangiev
  • 1,438
  • 3
  • 14
  • 21
-1
votes
1 answer

How to get the redis key creation time with jedis?

Is it possible to get the key creation timestamp in redis db using jedis? Thanks.
Sourabh Roy
  • 159
  • 1
  • 18
-1
votes
1 answer

Behaviour of zrangebyscore with string min and max in jedis

The method signature of the function I want to know about in Jedis is as follows: Set zrangeByScore(String key, String min, String max, int offset, …
-1
votes
1 answer

Invalid multibulk length In redis

I am getting the following exceptions while accessing Redis. Can anyone help me to resolve this? ERR Protocol error: invalid multibulk length; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: ERR Protocol error: invalid…
-1
votes
1 answer

java.util.ArrayList cannot be cast to java.lang.Long jedis

I am using Amazon ElastiCach for Redis to store some items. In one method I am calling redis 3 or 4 times with one jedis client getted from JedisPool. After last call to redis both JedisPool and Jedis are closed. I call this method a 50 time in a…
cojeca
  • 67
  • 1
  • 1
  • 7
-1
votes
2 answers

How to use JedisPool in Jmeter

I want to loadtest redis with jmeter. I already have a working JSR223Sampler with a groovy-script import redis.clients.jedis.Jedis; import java.util.concurrent.ThreadLocalRandom; String varuser = "user:" + ThreadLocalRandom.current().nextInt(1,…
derzeit
  • 43
  • 1
  • 5
-1
votes
2 answers

using jedis hmset method for inserting multiple field element in redis

I am implementing a simple redis command using jedis in java. The redis-cli command is: hmset myhash key "value1" field2 "value2" field3 "value3" The problem is that jedis's hmset method requires two parameters: String key Map
Stelios
  • 1,294
  • 3
  • 12
  • 28
-1
votes
1 answer

Using Jedis Client in Aws Lambda

I have an Aws Lambda function which is in VPC, and also an Aws Redis Elasticache which is also in same VPC. I would like to put data to this cache by using Jedis Java client in my Aws Lambda Function, code is like below, Jedis jedis = new…
Arda Güçlü
  • 728
  • 2
  • 6
  • 27
-1
votes
1 answer

Redis message queue with producer and consumer in different languages

I am using Redis database for building a message queue. I am trying to push the messages to the queuse using jedis in java and trying to consume the messages using rsmq-worker in node.js. However, the messages produced are not reveived at the…
Thasneem
  • 245
  • 1
  • 9
-1
votes
1 answer

Using JedisPool with Tomcat, resources not being returned back to pool

Looking at the output of redis client list, I see there are 600 active clients at the moment, and it continues to grow. Here's a snippet of output: id=285316 addr=x.x.x.x:55699 fd=14131 name= age=53055 idle=53029 flags=N db=0 sub=0 psub=0 multi=-1…
Franz Kafka
  • 780
  • 2
  • 13
  • 34
1 2 3
57
58