redis / lettucemod

Java client for Redis Modules
Apache License 2.0
51 stars 21 forks source link

FEATURE: Support lettuce 6.5.0 #62

Open mmoayyed opened 1 month ago

mmoayyed commented 1 month ago

Lettucemod 4.2.1 at the moment is built against Lettuce 6.4. Supporting Lettuce 6.5 will require some work given some APIs have changed. At the moment, using Lettuce 6.5 presents the following error:

Caused by: java.lang.NoSuchMethodError: 'void io.lettuce.core.StatefulRedisConnectionImpl.<init>(io.lettuce.core.RedisChannelWriter, io.lettuce.core.protocol.PushHandler, io.lettuce.core.codec.RedisCodec, java.time.Duration)'
    at com.redis.lettucemod.StatefulRedisModulesConnectionImpl.<init>(StatefulRedisModulesConnectionImpl.java:41) ~[lettucemod-4.1.2.jar:4.1.2]
    at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:249) ~[lettucemod-4.1.2.jar:4.1.2]
    at com.redis.lettucemod.RedisModulesClient.newStatefulRedisConnection(RedisModulesClient.java:48) ~[lettucemod-4.1.2.jar:4.1.2]
    at io.lettuce.core.RedisClient.connectStandaloneAsync(RedisClient.java:290) ~[lettuce-core-6.5.0.RELEASE.jar:6.5.0.RELEASE/7f455ec]
    at io.lettuce.core.RedisClient.connect(RedisClient.java:220) ~[lettuce-core-6.5.0.RELEASE.jar:6.5.0.RELEASE/7f455ec]
    at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:198) ~[lettucemod-4.1.2.jar:4.1.2]
    at com.redis.lettucemod.RedisModulesClient.connect(RedisModulesClient.java:183) ~[lettucemod-4.1.2.jar:4.1.2]

The constructor in question has changed its signature to the following:

public StatefulRedisConnectionImpl(RedisChannelWriter writer, PushHandler pushHandler, RedisCodec<K, V> codec, Duration timeout, 
    Mono<JsonParser> parser) {
}

If you'd like to see a pull request, please let me know.

orkwizard commented 2 weeks ago

Would be nice to have the PR

tishun commented 2 weeks ago

Actually I think that we need to support the existing API and this is more of a regression in Lettuce 6.5.0

I will log another issue to research if we can add the missing constructor in 6.5.1