skip to Main Content

Set connection parameters in RedisConnectionFactory

I have simple Redis client based on Spring below. As default it connects to local host, but I need to set different host and port. I suppose I can do it in function below: @Bean RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory,MessageListenerAdapter listenerAdapter) {…

VIEW QUESTION

org.springframework.data.redis.RedisConnectionFailureException: Could not get a resource from the pool – Debian

My cassandra docker-compose file: version: '2' services: redis-node-0: image: docker.io/bitnami/redis-cluster:latest ports: - "6370:6379" environment: - 'REDIS_PASSWORD=pass' - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5' redis-node-1: image: docker.io/bitnami/redis-cluster:latest ports: - "6371:6379" environment: - 'REDIS_PASSWORD=pass' - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5' redis-node-2:…

VIEW QUESTION

Make Redis as optional

I am using spring boot with Redis.Redis is running as Docker container spring.cache.type=redis spring.redis.host=localhost spring.redis.port=6379 Redis is a memory DB, if it finds data in Redis based on the key, it retrieved from Redis otherwise go into actual db call.…

VIEW QUESTION

Redis – Why does ResponseBody and Jackson ObjectMapper don't return the same output?

I am using a Spring Boot application. I have a method in my controller that returns some Resources: @ResponseBody @Transactional(rollbackFor = Exception.class) @GetMapping(value="data/{itemId}/items", produces="application/json") public Resources<DataExcerpt> listMyData(@PathVariable("debateId") UUID debateId)){ List<DataExcerpt> dataExcerpts = dataService .listMyData(id) .stream() .map(d -> this.projectionFactory.createProjection(DataExcerpt.class, d)) .collect(Collectors.toList());…

VIEW QUESTION
Back To Top
Search