Azure-Samples/azure-cache-redis-samples

How masterSlaveUsage() works in BasicUsage example

Opened this issue · 0 comments

Hi @warrenzhu25 .

I noticed Java/ClientSamples/src/main/java/lettuce/BasicUsage.java class contains masterSlaveUsage() method which could be used with Azure Redis Standard and Premium with cluster disabled.

In this method I see following code:

StatefulRedisMasterSlaveConnection<String, String> connection = MasterSlave.connect(client, new Utf8StringCodec(), redisUri);
connection.setReadFrom(ReadFrom.MASTER_PREFERRED);

How can this work? Running INFO Replication on Azure premium redis without cluster enabled returns only:

xxxxx.redis.cache.windows.net:6379> INFO REPLICATION
# Replication

How slaves can be discovered?