kandi background
Explore Kits

lettuce-core | Advanced Java Redis client for threadsafe sync | Command Line Interface library

 by   lettuce-io Java Version: 6.0.9.RELEASE License: Apache-2.0

 by   lettuce-io Java Version: 6.0.9.RELEASE License: Apache-2.0

Download this library from

kandi X-RAY | lettuce-core Summary

lettuce-core is a Java library typically used in Utilities, Command Line Interface applications. lettuce-core has build file available, it has a Permissive License and it has medium support. However lettuce-core has 85 bugs and it has 4 vulnerabilities. You can download it from GitHub, Maven.
<img src="https://avatars2.githubusercontent.com/u/25752188?v=4" width="50" height="50"> Lettuce - Advanced Java Redis client.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • lettuce-core has a medium active ecosystem.
  • It has 4439 star(s) with 816 fork(s). There are 215 watchers for this library.
  • There were 4 major release(s) in the last 12 months.
  • There are 54 open issues and 1638 have been closed. On average issues are closed in 34 days. There are 3 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of lettuce-core is 6.0.9.RELEASE
lettuce-core Support
Best in #Command Line Interface
Average in #Command Line Interface
lettuce-core Support
Best in #Command Line Interface
Average in #Command Line Interface

quality kandi Quality

  • lettuce-core has 85 bugs (7 blocker, 0 critical, 34 major, 44 minor) and 1809 code smells.
lettuce-core Quality
Best in #Command Line Interface
Average in #Command Line Interface
lettuce-core Quality
Best in #Command Line Interface
Average in #Command Line Interface

securitySecurity

  • lettuce-core has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • lettuce-core code analysis shows 4 unresolved vulnerabilities (1 blocker, 0 critical, 0 major, 3 minor).
  • There are 47 security hotspots that need review.
lettuce-core Security
Best in #Command Line Interface
Average in #Command Line Interface
lettuce-core Security
Best in #Command Line Interface
Average in #Command Line Interface

license License

  • lettuce-core is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
lettuce-core License
Best in #Command Line Interface
Average in #Command Line Interface
lettuce-core License
Best in #Command Line Interface
Average in #Command Line Interface

buildReuse

  • lettuce-core releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
lettuce-core Reuse
Best in #Command Line Interface
Average in #Command Line Interface
lettuce-core Reuse
Best in #Command Line Interface
Average in #Command Line Interface
Top functions reviewed by kandi - BETA

kandi has reviewed lettuce-core and discovered the below as its top functions. This is intended to give you an instant insight into lettuce-core implemented functionality, and help decide if they suit your requirements.

  • Gets a read connection for a given slot .
  • Register adapters in the conversion service .
  • Builds a Redis URI from the given URI .
  • Handle a command .
  • Run the reconnection attempt .
  • Make object zero .
  • Connect to the nodeset .
  • Initialize the Redis channel .
  • Reconnect to Redis
  • Convert an IPV6 string to a byte array .

lettuce-core Key Features

[synchronous](https://github.com/lettuce-io/lettuce-core/wiki/Basic-usage), [asynchronous](https://github.com/lettuce-io/lettuce-core/wiki/Asynchronous-API-%284.0%29) and [reactive](https://github.com/lettuce-io/lettuce-core/wiki/Reactive-API-%285.0%29) usage

[Redis Sentinel](https://github.com/lettuce-io/lettuce-core/wiki/Redis-Sentinel)

[Redis Cluster](https://github.com/lettuce-io/lettuce-core/wiki/Redis-Cluster)

[SSL](https://github.com/lettuce-io/lettuce-core/wiki/SSL-Connections) and [Unix Domain Socket](https://github.com/lettuce-io/lettuce-core/wiki/Unix-Domain-Sockets) connections

[Streaming API](https://github.com/lettuce-io/lettuce-core/wiki/Streaming-API)

[CDI](https://github.com/lettuce-io/lettuce-core/wiki/CDI-Support) and [Spring](https://github.com/lettuce-io/lettuce-core/wiki/Spring-Support) integration

[Codecs](https://github.com/lettuce-io/lettuce-core/wiki/Codecs) (for UTF8/bit/JSON etc. representation of your data)

multiple [Command Interfaces](https://github.com/lettuce-io/lettuce-core/wiki/Command-Interfaces-%284.0%29)

Support for [Native Transports](https://github.com/lettuce-io/lettuce-core/wiki/Native-Transports)

Compatible with Java 8++ (implicit automatic module w/o descriptors)

[Reference documentation](https://lettuce.io/docs/)

[Wiki](https://github.com/lettuce-io/lettuce-core/wiki)

[Javadoc](https://lettuce.io/core/release/api/)

default

copy iconCopydownload iconDownload
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.lettuce/lettuce-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.lettuce/lettuce-core)

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

copy iconCopydownload iconDownload
api ("org.springframework.boot:spring-boot-starter-data-redis") {
            exclude group: "io.lettuce", module: "lettuce-core"
            exclude group: "org.springframework.data", module: "spring-data-redis"
        }
api "org.springframework.data:spring-data-redis:2.5.0"
        api "redis.clients:jedis:3.6.0"
 resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
                if (details.requested.group == 'org.springframework.data' && details.requested.name == 'spring-data-redis' ) {
                    
                    details.useVersion("2.5.0")
                }
            }
        }
-----------------------
api ("org.springframework.boot:spring-boot-starter-data-redis") {
            exclude group: "io.lettuce", module: "lettuce-core"
            exclude group: "org.springframework.data", module: "spring-data-redis"
        }
api "org.springframework.data:spring-data-redis:2.5.0"
        api "redis.clients:jedis:3.6.0"
 resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
                if (details.requested.group == 'org.springframework.data' && details.requested.name == 'spring-data-redis' ) {
                    
                    details.useVersion("2.5.0")
                }
            }
        }
-----------------------
api ("org.springframework.boot:spring-boot-starter-data-redis") {
            exclude group: "io.lettuce", module: "lettuce-core"
            exclude group: "org.springframework.data", module: "spring-data-redis"
        }
api "org.springframework.data:spring-data-redis:2.5.0"
        api "redis.clients:jedis:3.6.0"
 resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
                if (details.requested.group == 'org.springframework.data' && details.requested.name == 'spring-data-redis' ) {
                    
                    details.useVersion("2.5.0")
                }
            }
        }

RedisCommandExecutionException in Java Lettuce Redis client

copy iconCopydownload iconDownload
user default off
user default off -@all +hello
user default on nopass -@all +hello
-----------------------
user default off
user default off -@all +hello
user default on nopass -@all +hello
-----------------------
user default off
user default off -@all +hello
user default on nopass -@all +hello

Missing Validators on tomcat

copy iconCopydownload iconDownload
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
<exclusions>
    <exclusion>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
    </exclusion>
</exclusions>
-----------------------
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
<exclusions>
    <exclusion>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
    </exclusion>
</exclusions>

Facing o.s.web.servlet.PageNotFound : No mapping for GET / problem in my spring boot project

copy iconCopydownload iconDownload
// note @ComponentScan is removed as it is included already in @SpringBootApplication
@EnableJpaRepositories
@SpringBootApplication
public class CunsultustodayWebServicesApplication {
...
// note @Controller and @CompnentScan are removed
@RestController
public class LoginController {
-----------------------
// note @ComponentScan is removed as it is included already in @SpringBootApplication
@EnableJpaRepositories
@SpringBootApplication
public class CunsultustodayWebServicesApplication {
...
// note @Controller and @CompnentScan are removed
@RestController
public class LoginController {

Why do I get no main manifest attribute, in rome-utils-1.15.0.jar?

copy iconCopydownload iconDownload
application {
    mainClass = "io.ktor.server.netty.EngineMain"
}

SQL syntax error in unit tests, after upgrade from Spring Boot 1.5.21 to 2.3.4

copy iconCopydownload iconDownload
spring:
  ...
flyway:
  enabled: false
spring:
  ...
  flyway:
    enabled: false
-----------------------
spring:
  ...
flyway:
  enabled: false
spring:
  ...
  flyway:
    enabled: false

Why the connection operation of Lettuce takes more time than Jedis?

copy iconCopydownload iconDownload
2020-08-15 00:54:06.030 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Creating executor io.netty.util.concurrent.DefaultEventExecutorGroup
2020-08-15 00:54:06.031 DEBUG 728 --- [           main] io.lettuce.core.RedisClient              : Trying to get a Redis connection for: RedisURI [host='localhost', port=6379]
2020-08-15 00:54:06.120 DEBUG 728 --- [           main] io.lettuce.core.EpollProvider            : Starting without optional epoll library
2020-08-15 00:54:06.122 DEBUG 728 --- [           main] io.lettuce.core.KqueueProvider           : Starting without optional kqueue library
2020-08-15 00:54:06.123 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Allocating executor io.netty.channel.nio.NioEventLoopGroup
2020-08-15 00:54:06.123 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Creating executor io.netty.channel.nio.NioEventLoopGroup
2020-08-15 00:54:06.124 DEBUG 728 --- [           main] i.n.channel.MultithreadEventLoopGroup    : -Dio.netty.eventLoopThreads: 12
2020-08-15 00:54:06.129 DEBUG 728 --- [           main] io.netty.channel.nio.NioEventLoop        : -Dio.netty.noKeySetOptimization: false
2020-08-15 00:54:06.129 DEBUG 728 --- [           main] io.netty.channel.nio.NioEventLoop        : -Dio.netty.selectorAutoRebuildThreshold: 512
2020-08-15 00:54:06.421 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Adding reference to io.netty.channel.nio.NioEventLoopGroup@7c59cf66, existing ref count 0
2020-08-15 00:54:06.431 DEBUG 728 --- [           main] io.lettuce.core.RedisClient              : Resolved SocketAddress localhost:6379 using RedisURI [host='localhost', port=6379]
2020-08-15 00:54:06.432 DEBUG 728 --- [           main] io.lettuce.core.RedisClient              : Connecting to Redis at localhost:6379
2020-08-15 00:54:06.435 DEBUG 728 --- [           main] io.netty.channel.DefaultChannelId        : -Dio.netty.processId: 728 (auto-detected)
2020-08-15 00:54:06.437 DEBUG 728 --- [           main] io.netty.util.NetUtil                    : -Djava.net.preferIPv4Stack: false
2020-08-15 00:54:06.437 DEBUG 728 --- [           main] io.netty.util.NetUtil                    : -Djava.net.preferIPv6Addresses: false
2020-08-15 00:54:06.659 DEBUG 728 --- [           main] io.netty.util.NetUtil                    : Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
2020-08-15 00:54:06.660 DEBUG 728 --- [           main] io.netty.util.NetUtil                    : Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
2020-08-15 00:54:06.898 DEBUG 728 --- [           main] io.netty.channel.DefaultChannelId        : -Dio.netty.machineId: 00:50:56:ff:fe:c0:00:08 (auto-detected)
2020-08-15 00:54:06.911 DEBUG 728 --- [           main] io.netty.buffer.ByteBufUtil              : -Dio.netty.allocator.type: pooled
2020-08-15 00:54:06.912 DEBUG 728 --- [           main] io.netty.buffer.ByteBufUtil              : -Dio.netty.threadLocalDirectBufferSize: 0
2020-08-15 00:54:06.912 DEBUG 728 --- [           main] io.netty.buffer.ByteBufUtil              : -Dio.netty.maxThreadLocalCharBufferSize: 16384
2020-08-15 00:54:06.928 DEBUG 728 --- [ioEventLoop-8-1] io.netty.util.Recycler                   : -Dio.netty.recycler.maxCapacityPerThread: 4096
2020-08-15 00:54:06.928 DEBUG 728 --- [ioEventLoop-8-1] io.netty.util.Recycler                   : -Dio.netty.recycler.maxSharedCapacityFactor: 2
2020-08-15 00:54:06.928 DEBUG 728 --- [ioEventLoop-8-1] io.netty.util.Recycler                   : -Dio.netty.recycler.linkCapacity: 16
2020-08-15 00:54:06.928 DEBUG 728 --- [ioEventLoop-8-1] io.netty.util.Recycler                   : -Dio.netty.recycler.ratio: 8
2020-08-15 00:54:06.928 DEBUG 728 --- [ioEventLoop-8-1] io.netty.util.Recycler                   : -Dio.netty.recycler.delayedQueue.ratio: 8
2020-08-15 00:54:06.933 DEBUG 728 --- [ioEventLoop-8-1] io.netty.buffer.AbstractByteBuf          : -Dio.netty.buffer.checkAccessible: true
2020-08-15 00:54:06.933 DEBUG 728 --- [ioEventLoop-8-1] io.netty.buffer.AbstractByteBuf          : -Dio.netty.buffer.checkBounds: true
2020-08-15 00:54:06.933 DEBUG 728 --- [ioEventLoop-8-1] i.n.util.ResourceLeakDetectorFactory     : Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@20e9fc6c
2020-08-15 00:54:06.950 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, [id: 0x7bd077d9] (inactive), chid=0x1] channelRegistered()
2020-08-15 00:54:06.953 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, chid=0x1] channelActive()
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] activateEndpointAndExecuteBufferedCommands 0 command(s) buffered
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] activating endpoint
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] flushCommands()
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] flushCommands() Flushing 0 commands
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] i.l.core.protocol.ConnectionWatchdog     : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, last known addr=localhost/127.0.0.1:6379] channelActive()
2020-08-15 00:54:06.954 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, chid=0x1] channelActive() done
2020-08-15 00:54:06.955 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.RedisClient              : Connecting to Redis at localhost:6379: Success
2020-08-15 00:54:06.956  INFO 728 --- [           main] c.h.s.c.c.CacheStudyApplicationTests     : lettuce : 925 ms
2020-08-15 00:54:06.956 DEBUG 728 --- [           main] io.lettuce.core.RedisChannelHandler      : close()
2020-08-15 00:54:06.956 DEBUG 728 --- [           main] io.lettuce.core.RedisChannelHandler      : closeAsync()
2020-08-15 00:54:06.956 DEBUG 728 --- [           main] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] closeAsync()
2020-08-15 00:54:06.957 DEBUG 728 --- [ioEventLoop-8-1] i.l.core.protocol.ConnectionWatchdog     : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, last known addr=localhost/127.0.0.1:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@1cda757f)
2020-08-15 00:54:06.958 DEBUG 728 --- [           main] io.lettuce.core.RedisClient              : Initiate shutdown (0, 2, SECONDS)
2020-08-15 00:54:06.959 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, chid=0x1] channelInactive()
2020-08-15 00:54:06.959 DEBUG 728 --- [ioEventLoop-8-1] i.lettuce.core.protocol.DefaultEndpoint  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, epid=0x1] deactivating endpoint handler
2020-08-15 00:54:06.960 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, chid=0x1] channelInactive() done
2020-08-15 00:54:06.960 DEBUG 728 --- [ioEventLoop-8-1] i.l.core.protocol.ConnectionWatchdog     : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, last known addr=localhost/127.0.0.1:6379] channelInactive()
2020-08-15 00:54:06.960 DEBUG 728 --- [ioEventLoop-8-1] i.l.core.protocol.ConnectionWatchdog     : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, last known addr=localhost/127.0.0.1:6379] Reconnect scheduling disabled
2020-08-15 00:54:06.960 DEBUG 728 --- [ioEventLoop-8-1] io.lettuce.core.protocol.CommandHandler  : [channel=0x1ced470d, /127.0.0.1:2106 -> localhost/127.0.0.1:6379, chid=0x1] channelUnregistered()
2020-08-15 00:54:06.961 DEBUG 728 --- [           main] i.l.c.resource.DefaultClientResources    : Initiate shutdown (0, 2, SECONDS)
2020-08-15 00:54:06.963 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Initiate shutdown (0, 2, SECONDS)
2020-08-15 00:54:06.963 DEBUG 728 --- [           main] i.l.c.r.DefaultEventLoopGroupProvider    : Release executor io.netty.channel.nio.NioEventLoopGroup@7c59cf66
2020-08-15 00:54:06.965 DEBUG 728 --- [ioEventLoop-8-1] io.netty.buffer.PoolThreadCache          : Freed 1 thread-local buffer(s) from thread: lettuce-nioEventLoop-8-1

RedisMessageListenerContainer : Connection failure occurred. Restarting subscription task after 5000 ms

copy iconCopydownload iconDownload
@Configuration
public class RedisConfig {

@Bean
LettuceConnectionFactory lettuceConnectionFactory() {
    return new LettuceConnectionFactory();
}

@Bean
public RedisTemplate<String, Object> redisTemplate() {
    final RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
    template.setConnectionFactory(lettuceConnectionFactory());
    template.setValueSerializer(new GenericToStringSerializer<Object>(Object.class));
    return template;
}

@Bean
MessageListenerAdapter messageListener() {
    return new MessageListenerAdapter(new RedisMessageSubscriber());
}

@Bean
RedisMessageListenerContainer redisContainer() {
    final RedisMessageListenerContainer container = new RedisMessageListenerContainer();
    container.setConnectionFactory(lettuceConnectionFactory());
    container.addMessageListener(messageListener(), topic());
    return container;
}

@Bean
MessagePublisher redisPublisher() {
    return new RedisMessagePublisher(redisTemplate(), topic());
}

@Bean
ChannelTopic topic() {
    return new ChannelTopic("pubsub:queue");
}

Where does client Lettuce from a library lettuce-core store data?

copy iconCopydownload iconDownload
    @Bean
public RedisTemplate<String, Object> redisTemplate() {
    final RedisTemplate<String, Object> template = new RedisTemplate<>();
    template.setConnectionFactory(lettuceConnectionFactory());
    template.setKeySerializer(new GenericToStringSerializer<>(Object.class));
    template.setValueSerializer(new Jackson2JsonRedisSerializer<>(Object.class));
    return template;
}

Lettuce - Java - AWS ElastiCache - Redis - Connection Timeout

copy iconCopydownload iconDownload
RedisURI upstreamUri = RedisURI.Builder.redis(primayNodeUrl, 6379).build();
RedisClient redisClient = RedisClient.create();
StatefulRedisMasterReplicaConnection<String, String> connection = 
MasterReplica.connect(
                redisClient,
                StringCodec.UTF8,
                upstreamUri);
connection.setReadFrom(ReadFrom.REPLICA_PREFERRED);
RedisAsyncCommands<String, String> asyncCommands = connection.async();

Community Discussions

Trending Discussions on lettuce-core
  • Streams not supported when using Jedis 3.6.0 in spring boot 2.3.x
  • RedisCommandExecutionException in Java Lettuce Redis client
  • Missing Validators on tomcat
  • Facing o.s.web.servlet.PageNotFound : No mapping for GET / problem in my spring boot project
  • Why do I get no main manifest attribute, in rome-utils-1.15.0.jar?
  • SQL syntax error in unit tests, after upgrade from Spring Boot 1.5.21 to 2.3.4
  • Why the connection operation of Lettuce takes more time than Jedis?
  • RedisMessageListenerContainer : Connection failure occurred. Restarting subscription task after 5000 ms
  • Where does client Lettuce from a library lettuce-core store data?
  • Lettuce - Java - AWS ElastiCache - Redis - Connection Timeout
Trending Discussions on lettuce-core

QUESTION

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

Asked 2021-May-11 at 15:13

Today when I want to using Jedis to consume stream, throw this error:

java.lang.UnsupportedOperationException: Streams not supported using Jedis!
    at org.springframework.data.redis.connection.jedis.JedisConnection.streamCommands(JedisConnection.java:154) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.connection.DefaultedRedisConnection.xReadGroup(DefaultedRedisConnection.java:591) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.DefaultStreamOperations$4.inRedis(DefaultStreamOperations.java:310) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.DefaultStreamOperations$RecordDeserializingRedisCallback.doInRedis(DefaultStreamOperations.java:376) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.DefaultStreamOperations$RecordDeserializingRedisCallback.doInRedis(DefaultStreamOperations.java:371) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:228) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.core.DefaultStreamOperations.read(DefaultStreamOperations.java:305) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.stream.DefaultStreamMessageListenerContainer.lambda$getReadFunction$3(DefaultStreamMessageListenerContainer.java:236) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.stream.StreamPollTask.doLoop(StreamPollTask.java:138) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at org.springframework.data.redis.stream.StreamPollTask.run(StreamPollTask.java:123) ~[spring-data-redis-2.3.9.RELEASE.jar:2.3.9.RELEASE]
    at misc.config.async.pool.MdcTaskDecorator.lambda$decorate$0(MdcTaskDecorator.java:29) ~[classes/:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

I have search the docs that I know the Jedis is support Redis stream. Why did this still tell me did not support Redis Stream? This is my dependencies define in Gradle, this code force using 3.6.0 version of Jedis:

resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
              
                if (details.requested.group == 'redis.clients') {
                    details.useVersion "3.6.0"
                }
                
            }
        }

this code import Jedis:

api ("org.springframework.boot:spring-boot-starter-data-redis") {
            exclude group: "io.lettuce", module: "lettuce-core"
            exclude group: "redis.clients", module: "jedis"
        }
        api "redis.clients:jedis:3.6.0"

what should I do to avoid this problem? I tried this way to upgrade my spring data version like this:

api ("org.springframework.boot:spring-boot-starter-data-redis") {
            exclude group: "io.lettuce", module: "lettuce-core"
            exclude group: "org.springframework.data", module: "spring-data-redis"
        }
        api "org.springframework.data:spring-data-redis:2.5.0"

seems would cause other compatiable problem. And now I am using 2.3.10.RELEASE is already the newest version of spring boot 2.3.x. Should I upgrade to 2.4.x? If I upgrade to spring boot 2.4.x, there is no compatiable stable spring cloud version to match.

ANSWER

Answered 2021-May-11 at 13:32

You're using spring-data-redis 2.3.9.

The support of Streams with Jedis is only available from 2.5.0. So you'll have to use at least 2.5.0 version of spring-data-redis.

Source https://stackoverflow.com/questions/67485923

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install lettuce-core

You can download it from GitHub, Maven.
You can use lettuce-core like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the lettuce-core component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Consider Popular Command Line Interface Libraries
Compare Command Line Interface Libraries with Highest Support
Compare Command Line Interface Libraries with Highest Quality
Compare Command Line Interface Libraries with Highest Security
Compare Command Line Interface Libraries with Permissive License
Compare Command Line Interface Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.