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

CRUD repository bean not found exception

I have an application which connects to AWS DynamoDB. I am trying to implement Redis connection using Jedis into this application. However, just after I add this dependency - org.springframework.boot
5
votes
1 answer

How to connect to a Docker Redis cluster instance using jedis for Java?

I have created a cluster of 6 nodes using redis docker-compose (3 master and 3 slave) and also linked all of them. cluster…
5
votes
0 answers

Can I use Jedis and Redisson together?

I have a redisdatabase in my spring bootapplication. I use Jedis as my Redis client for retrieval, update and delete. Now I'm willing to add distributed locks to my service, so I thought about using Redisson distributed locks. So my Redisson lock…
Ahmed El-Gamal
  • 180
  • 3
  • 18
5
votes
1 answer

JedisConnectionException - Read timed out error

I'm trying to connect to AWS ElastiCache Redis using Spring Data Redis + Jedis combination. [Redis Cluster enabled, so it has Cluster Config endpoint, with 3 shard - each shard has 1 primary node + 2 replica nodes ] I'm getting Read timed out…
5
votes
1 answer

Spring Redis template with Jedis connection factory , Redis standalone configuration and multi-threading

I am using Spring Redis template in a multi-threaded environment. One thread saves the data into Redis and other one (the scheduler) fetches the data from it. JedisConnectionFactory is used in redis template. Following is the code snippet for…
Swinky
  • 359
  • 1
  • 3
  • 9
5
votes
2 answers

Spring Data Redis and Jedis Compatibility issue

I am trying to Create a JedisConnection factory from a RedisClusterConfiguration(Pseudo code given below ) but I face a compile time error The type redis.clients.jedis.JedisShardInfo cannot be resolved.It is indirectly referenced from a required…
rahul
  • 71
  • 1
  • 1
  • 7
5
votes
2 answers

JedisCluster : redis.clients.jedis.exceptions.JedisNoReachableClusterNodeException: No reachable node in cluster

I was trying to connect to JedisCluster (ElastiCache Redis) from java. But I was getting JedisConnectionException with No reachable node in the cluster. Here was my code to connect to JedisCluster public static void main(String[] args) throws…
Unknown
  • 2,037
  • 3
  • 30
  • 47
5
votes
4 answers

Cannot get Jedis connection; Could not get a resource from the pool

I am running a batch job for every 5 minutes and I don't wanna other nodes to run the same job hence I am using Jedis lock to lock an object for 5 minutes. So that other node won't get the lock if they try to run the same job. Job started after…
gcpdev-guy
  • 460
  • 1
  • 10
  • 23
5
votes
1 answer

What's the most efficient way to create a medium to large list/set/zset/hash in redis?

Using redis, there are a number of commands to retrieve entire data structures (LRANGE for lists, SMEMBERS for sets, ZRANGE for sorted sets, and HGETALL for hashes). Only the hash has a method (HMSET) to insert multiple items with a single…
Ted Naleid
  • 26,511
  • 10
  • 70
  • 81
5
votes
1 answer

RedisTemplate keys(String pattern) method is giving empty set

Using org.springframework.data.redis.core.RedisTemplate for storing data in redis server. I have the keys in pattern similar to "abc@xyz@pqr". Wanted to get all the keys which have the starting letters as "abc", and was using…
Virat Mishra
  • 155
  • 1
  • 2
  • 9
5
votes
2 answers

What is a proper way to connect to AWS Elasticache (Redis cluster) from Java?

I'm new to AWS Elasticache redis, and I got below endpoint. I'm confused in either using Jedis and Redisson, because both provides single connection and cluster connection class. Like in Jedis, for a single connection we can use: Jedis conn = new…
5
votes
2 answers

Use Connection pool with Jedis

I am using Jedis to connect with a Redis server in a REST service. When I am calling the web service I want to do operations like jedis.hmget , jedis.exits and hgetALL. For example: jedis.hmget("employee:data:" + emp_user_id,…
5
votes
4 answers

JedisConnectionException: Unexpected end of stream error

I am trying to perform rpush operation and encountered the following error: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream. at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)…
Radhika Satish
  • 53
  • 1
  • 1
  • 3
5
votes
2 answers

Broken pipe while using Jedis Pool

I'm using Jedis to perform a lot of insertions/reads in Redis. The Redis server is using the default configuration. The problem appears when I start using a few threads and the exception is: redis.clients.jedis.exceptions.JedisConnectionException:…
Allexandre S.
  • 111
  • 1
  • 2
  • 9
5
votes
2 answers

spring-data-redis 1.7.2 Injection redisTemplate failed

When I use Spring Data Redis to inject redisTemplate, the following error occurs: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in…
web david
  • 61
  • 2
  • 5