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

Spring Session Data Redis - Get Valid Sessions, Current User from Redis Store

My question is, in distributed web application is it possible to get the valid sessions from Redis Store using RedisOperationSessionRepository. (I mean I don't want to write explicit code for putting...

View Article


How to configure spring boot to talk to Redis via lettuce using username and...

I need some help to connect my spring boot application to Redis.I have a readonly user with username and password configured in redis. Now i need to connect to redis to fetch some records using this...

View Article


Spring Data with Redis: How do I use a different LocalDateTime format or a...

I have data in my DB for field date with the following format: 2021-09-21 11:25:36.The Redis field is of type TEXT.When I'm trying to read the data from date field from the DB, I get following...

View Article

How to connect to Redis Cluster using Quarkus Redis and port forwarding?

I'm trying to debug a "change hostname on redirect" issue with Quarkus RedisThis works fine:package org.acme;import io.vertx.mutiny.core.Vertx;import io.vertx.mutiny.redis.client.Command;import...

View Article

JUnit: how to mock Jedis

I'm writing a session store for tomcat in order to drain the inactive sessions into a redis server. I'm going to write the unit tests but I cannot figured out how to mock the calls to the redis server....

View Article


spring boot, redis + mysql Debug mode Exception

I can't figure out the cause of this problem, so I'm posting it here.I think it's a configuration or environmental factor rather than a code problem.Sorry for not uploading all the code because the...

View Article

redisson unable to connect to sentinel with ssl, it is getting the master as...

we have a redis-sentinel cluster consisting of three VMs running redis and sentinel, and I am using redisson library to connect to it.However we are facing an issue when connecting to it.It seems that...

View Article

Spring Data Redis Expire Key

I have a One Spring Hibernate Application. In my application, Recently i am implemented Spring data Redis.spring-servlet.xml<!-- redis connection factory --><bean id="jedisConnFactory"...

View Article


Spring Integration test with Embedded Redis Server and RedisTemplate can't...

I've added Spring Data Redis for saving my entities and I have configured a RedisTemplate for that which works fine.I've annotated my Application.class with:...

View Article


Redis sort & retrieve elements inside hash

In my application, I'm using redis to store List<Document> in hash objects.class Document { long id; String title; Author author;}class Author { long id; String authorName;}So in redis I've hash...

View Article

embedded-redis providing own executables

I need to use the latest version of Redis, using the library https://github.com/ozimov/embedded-redis. I can provide my own executable but is there a place where I can download executables for...

View Article

Spring Data Redis Repository returning null for expired entries

I'm using a CrudRepository for connecting to Redis in my Spring Boot application and a @TimeToLive annotated field in the entity for expiration:@RedisHash("keyspace")public class MyRedisEntity { @Id...

View Article

Race condition between two threads involving database update and reads

Consider a situation:List = get_list_by_key(key) //get from redisif(list.size() != 0){ //do something} else { add_to_list(key, value) //put to redis}The problem I'm facing is when two simultaneous...

View Article


Could not get a resource from the pool(SocketTimeoutException:)

I'm running multiple worker threads(around 10) to access the data from the redis Q.For the i'm using infinte timeout for Jedis Client. Jedis jedis =...

View Article

Streams not supported when using Jedis 3.6.0 in spring boot 2.3.x

Today when I want to using Jedis to consume stream, throw this error:java.lang.UnsupportedOperationException: Streams not supported using Jedis! at...

View Article


Lua script coverts empty array to object

Lua script converts empty array as an object. How to avoid conversion.test.lualocal json_str = '{\"items\":[],\"properties\":{}}'return cjson.encode(cjson.decode(json_str))Outputredis-cli --eval...

View Article

Lua script converts empty array to object

Lua script converts empty array as an object. How to avoid conversion.test.lualocal json_str = '{\"items\":[],\"properties\":{}}'return cjson.encode(cjson.decode(json_str))Outputredis-cli --eval...

View Article


How to use Redis Cache in java spring boot application?

How to use AWS Redis Cache in Spring boot application?I have already a running instance of Redis Cache in AWS. Without using EC2 I want to use the Redis Cache instance to save the xml file in Redis...

View Article

How to use Redis command "bitcount" in java

I am trying to use redis bitmap to save online user, use command "bitcount onlineUser" to count the number of online user.I use RedisTemplate to deal with redis. But I can't find any API in...

View Article

Redis refuses connection to Spring Boot via Docker Compose

I developed a spring boot application to store login information via redis. I have following docker-compose.yml:version: "3.9"services: web: build: . ports: - "8082:8082" links: - redis redis: image:...

View Article
Browsing all 2203 articles
Browse latest View live