Support
Quality
Security
License
Reuse
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.
[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
[](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
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
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
[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
// 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?
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
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?
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
@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?
@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
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();
QUESTION
Streams not supported when using Jedis 3.6.0 in spring boot 2.3.x
Asked 2021-May-11 at 15:13Today 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:32You'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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Explore Related Topics
Save this library and start creating your kit