Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Browsing all 2203 articles
Browse latest View live

Redis Cache invalidation Strategies in Java Spring

I'm adding Redis to our Spring project and want to determine a suitable caching strategy. I am considering caching the result at the Controller's endpoint/method level for GET requests and invalidating...

View Article


spring-could-gateway: reactor.netty.channel.AbortedException: Connection has...

I am getting the following exception in the spring gateway. This exception appears when I have configured Redis Sentinel in the gateway, it throughs exception after a couple of requests in the gateway....

View Article


Setting Up Redis High Availability (HA) on open-shift cluster and virtual...

I have a spring boot application which is deployed on open-shift cluster. The application uses Redis, so for that I have also deployed redis docker image on open-shift registry.This redis image is...

View Article

Like JedisPool in java is there any package in golang

Is there any package or module in golang similar to jedispool to get all redis details such as client name, host etc. I tried using github.com/gomodule/redigo/redis but could not find such functions...

View Article

Mock redis template

I am facing a issue in mock redis template.Can any one help me to write unit test for below class.@Repositorypublic class CasheRepo { @Autowired private RedisTemplate<String, Object> template;...

View Article


Stop the test spring from auto requiring the RedisConfiguration?

I have defined a bean for Redis in my Document.xml.<bean id="redisConfiguration" class="com.project.RedisConfiguration"/>My tests are failing locally if I don't have a redis started, and in a...

View Article

Authentication Principal is empty while using Spring Session Redis

I am building rest API using Spring Boot v1.3.3. API is secured by Spring Security. I have implemented custom user details service to have custom principal in authentication context.I needed to share...

View Article

Jedis : Could not get a resource from the pool

BackgroundOur application uses Jedis-2.2.1 and connects to Redis-2.6, here's how I get jedis resource : protected static JedisWrapper getRedisUserWrite(String UDID) { if (redisUserWritePools.get(0) ==...

View Article


How do you add elements to a Redis Hash and set the expiration using...

If it wasn't reactive I'd do something like./** * Given a refresh token and the user name, create a "payload" to represent * secret data and store it into Redis as a hash and set it to expire in 30...

View Article


Image may be NSFW.
Clik here to view.

Redis with jHipster - Default configuration hasn't been specified

im using jhipster version 7.6.0 and this is my CacheConfiguration class.@Configuration@EnableCachingpublic class CacheConfiguration {private GitProperties gitProperties;private BuildProperties...

View Article

Jedis error Could not get a resource from the pool

I'm currently using jedis version 2.9.0 in my maven webapp. It consists in a loop that retrieves data for caching every five minutes. For that purpose, I'm creating a jedispool on app Scheduler class...

View Article

Image may be NSFW.
Clik here to view.

Redis with jHipster - Default configuration hasn't been specified

im using jhipster version 7.6.0 and this is my CacheConfiguration class.@Configuration@EnableCachingpublic class CacheConfiguration {private GitProperties gitProperties;private BuildProperties...

View Article

How can I mock a method that has a parameter with a private constructor?

I have an abstract cache client with an implementation that I'm trying to add unit tests to, and it has a protected class implementation of the key. Like this:public abstract class...

View Article


How to recover in Spring from a disconnected Redis message listener?

We had a situation occur today that took our Redis instance offline for a few minutes. We have several microservices that are configured to listen for messages on various channels. When Redis went...

View Article

Cannot get Jedis connection; nested exception is...

I am trying to connect my Spring Boot project to ElasticCache Redis in AWS. However, I get this error:Cannot get Jedis connection; nested exception is...

View Article


Why do I get a SocketTimeoutException when trying to connect to ElasticCache...

I am trying to connect my Spring Boot project to ElasticCache Redis in AWS. However, I get this error:Cannot get Jedis connection; nested exception is...

View Article

Sorting and Filter Over PII Data

I have a large set of User PII data, currently, we are storing on Relational Data encrypted with AWS KMS. Now I have to paginate data based on UserName. The only we have to do right now is load all...

View Article


is it possible to let the redis auto create the group name if it not exists...

When I delele the Redis 6 stream group name, the spring application throw error like this:Caused by: redis.clients.jedis.exceptions.JedisDataException: NOGROUP No such key 'pydolphin:stream:article' or...

View Article

Spring Data Redis resolving race conditions

Currently I am trying to develop an application using Spring Data Redis but I’m looking for a solution to the current race condition I am facing.The general idea for the application is:Retrieve a key...

View Article

why the spring data Redis did not consume the Redis stream message

I am using spring data Redis 2.5.7 to consume the stream messages from Redis, this is my consumer code looks like:package com.dolphin.soa.post.common.mq;import com.alibaba.fastjson.JSON;import...

View Article
Browsing all 2203 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>