Skip to content

How masterSlaveUsage() works in BasicUsage example #6

@mkozioro

Description

@mkozioro

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions