-
We have upgraded a dependency that itself depended on We are creating the Redis URI to the "managed GCP Redis" as follows: private RedisClient redisClient() {
return RedisClient.create(RedisURI.builder()
.withClientName(properties.getRedis().getClientName())
.withHost(properties.getRedis().getHost())
.withPort(properties.getRedis().getPort())
.build());
} Earlier the Questions:
Some hints I have found the understand this change in behavior. /**
* @param clientName
* @deprecated since 6.0, use {@link RedisAsyncCommands#clientSetname(Object)}.
*/
@Deprecated
public void setClientName(String clientName) {
CommandArgs<String, String> args = new CommandArgs<>(StringCodec.UTF8).add(CommandKeyword.SETNAME).addValue(clientName);
AsyncCommand<String, String, String> async = new AsyncCommand<>(
new Command<>(CommandType.CLIENT, new StatusOutput<>(StringCodec.UTF8), args));
state.setClientName(clientName);
dispatch((RedisCommand) async);
} And this PR: My understanding:
Naive way would be prefixing every key with Thanks in advance and cheers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It looks as if your Redis server rejects the |
Beta Was this translation helpful? Give feedback.
It looks as if your Redis server rejects the
CLIENT SETNAME
command. If you're using Redis 6, then you could enable RESP3 as RESP3 uses theHELLO
command to initialize the connection and that takes the client name as well.