Reputation: 13
I'm encountering an issue with embedded Redis v1.0.0 in a Quarkus application while running integration tests, but i get this error message:
java.util.concurrent.CompletionException: ERR unknown command `getex`, with args beginning with: `cache:all-layover-panels:1235`, `EX`, `345600`
Upon some research, it appears that the error is due to the fact that embedded Redis v1.0.0 on my Windows machine is using Redis v5, where the getex command is not supported (it's introduced in Redis v6).
I was advised to utilize additional Redis binaries (https://github.com/codemonstur/embedded-redis/blob/embedded-redis-1.4.3/README.md#binaries) that are included in the library but are not part of the default set. There is a suggestion to use ExecutableProvider and newCachedUrlProvider to manage Redis binaries, with example code provided in DownloadUriTest.java as follows:
package tools;
import redis.embedded.core.ExecutableProvider;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import static redis.embedded.RedisServer.newRedisServer;
import static redis.embedded.core.ExecutableProvider.REDIS_7_2_MACOSX_14_SONOMA_HANKCP;
import static redis.embedded.core.ExecutableProvider.newCachedUrlProvider;
public enum DownloadUriTest {;
public static void main(final String... args) throws IOException {
final Path cacheLocation = Paths.get(System.getProperty("java.io.tmpdir"), "redis-binary");
newRedisServer()
.executableProvider(newCachedUrlProvider(cacheLocation, REDIS_7_2_MACOSX_14_SONOMA_HANKCP))
.build()
.start();
}
}
However, I'm unsure how to properly use this ExecutableProvider and integrate it with my Quarkus application to resolve the ERR unknown command getex`` issue.
Could someone provide guidance or a step-by-step example on how to use ExecutableProvider and newCachedUrlProvider effectively with embedded Redis v1.0.0 in a Quarkus environment? Specifically, how can I configure the Redis binaries to ensure compatibility with my application and resolve the unsupported command issue?
Any help or insights into resolving this Redis version compatibility issue within Quarkus would be greatly appreciated
Upvotes: 1
Views: 386