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

how to make main thread wait for another one to finish in Java?

I have come up with following thread 'halo' to make it connect to db (redis, in this case) and in the event that server fails, would wait for a second and try again. In my unit test class, method is executing, and not long after new thread starts,…
Joe Jung
  • 47
  • 1
  • 7
0
votes
0 answers

JedisConnectionFactory fails to connect to Elasticache even though redis-cli ping is successful

I'm running Java/Tomcat project in Elastic Beanstalk. I've setup an Elasticache group in the same vpc. Currently, just testing with a single EC2 instance. The app is Spring Boot with spring-boot-starter-redis. It tries to ping Redis with…
jiggy
  • 3,828
  • 1
  • 25
  • 40
0
votes
0 answers

Jedis Returning same value even though the lua script removes it

I am using jedis and jedis connection pooling in my app. I am using redis sorted set collection to store the data. In my app using LUA script i am poping data (Remove). The LUA script contains 5 to 6 commands. My app is in multithreaded one so I am…
Hakuna Matata
  • 755
  • 3
  • 13
0
votes
2 answers

Redis Sentinel and ShardedJedis for ShardedJedisPipeline

I was initially using Redis in cluster mode at production. But later I realised that if I use Redis independent servers using ShardedJedis java API, I can use ShardedJedisPipeline which has better performance due to obvious reasons. But while using…
abi_pat
  • 572
  • 2
  • 12
  • 35
0
votes
1 answer

How do you subscribe to sentinel and receive publication from them?

I am trying to use pub/sub impl. on Jedis to get information about master going down, but I am not sure how to subscribe to Sentinel channel. My publisher class: public Publisher(Jedis publisherJedis, String channels, String clusterName) { …
Joe Jung
  • 47
  • 1
  • 7
0
votes
1 answer

What exactly is Redis Subscription Channel?

So when I create a new Jedis subscription instance, and make my Jedis instance to subscribe to it, I have to specify the channel. What exactly is it? I am assuming that it is a string that will be a url of some other systems [I have an API platform…
Joe Jung
  • 47
  • 1
  • 7
0
votes
0 answers

Spring data redis error in Spring mvc framework

I'm using to redis in spring mvc based web application. so I used spring-data-redis & jedis. The library version is the following. Spring MVC 4.1.6 jedis 3.0 Spring data redis 1.6 SNAPSHOT Redis Server 3.0.2 (installed on Cent OS 7) Application…
Zin Zu
  • 1
  • 2
0
votes
1 answer

Unable to add Jedis module to Play 2.4.1 even though following the exact instructions

I'm following the instructions on https://github.com/typesafehub/play-plugins/tree/master/redis#how-to-install. When I compile, it says that the plugin doesn't exist... What am I doing wrong... My build.sbt after adding the plugin: …
iCodeLikeImDrunk
  • 17,085
  • 35
  • 108
  • 169
0
votes
1 answer

Redis hooking (publish-subscribe) under stress tests - performance under load

Based on the suggested solusion and following the example, I'm trying to delete a key right after I get a notification that another key has expired. The problem is that under stress test with heavy load of seting 600K new keys and setting half of…
Elad G.
  • 146
  • 7
0
votes
1 answer

Call Redis (or other db) from within Spray Route

I am trying to figure out the best way to establish a Redis Pool and then make calls to Redis from within a Spray route. I want to make sure that I can use the connection pool for Redis connections. What would be the best way to instantiate the…
scarpacci
  • 8,957
  • 16
  • 79
  • 144
0
votes
1 answer

How connect two or more subscribers in Jedis(Java Redis)?

I have two subscribers which should connect to different channels. But if I try subscribe them to channels nothing happens. I think that it is some multithreading problem but have not any idea how solve this problem. Is there any example for how to…
mechanikos
  • 771
  • 12
  • 32
0
votes
1 answer

Jedis connection refused

I'm trying to connect to my virtual machine Redis package nosql; import redis.clients.jedis.Jedis; public class NoSQL { public static void main(String[] args) { //I try port: ("127.0.0.1",6379) Jedis jedis = new…
Leonardo Lacerda
  • 397
  • 1
  • 3
  • 15
0
votes
1 answer

Can you expire a key value pair for a hashKey in Redis

I want to expire a particular key/value pair set in a hashKey in redis. But redis expires the whole hashKey with all keyValue pairs inside lost. For example i just want to remove Key:666 from seqNu. Using jedis.setex is other option but u cant set a…
0
votes
1 answer

How to ensure memory consumption is not scaling with the size of the redis database

I am currently using Jedis for fetching my data from redis database server. I need to push this data on to MySQL. The redis server has millions of records in it. Using the below statements I can copy the data in to a set: String pattern =…
theja_swarup
  • 167
  • 2
  • 9
0
votes
1 answer

Jedis filtering values in hmset

I have some values in redis with this key structure key:1:abc -> votes -> 0 -> name -> John key:1:xyz -> votes -> 0 -> name -> Mary key:1:def -> votes -> 1 -> name -> Larry key:2:ijk -> votes -> 0 ->…
anonymous123
  • 1,271
  • 6
  • 19
  • 43