Skip to content

Proposal: Add AllowDirect to NatsKVConfig #1060

@mjacus3

Description

@mjacus3

Proposed change

Add AllowDirect as an optional configuration to NatsKVConfig so that KV streams can be configured to read from leader.

Use case

NATS KV Streams cannot currently be configured with AllowDirect = false which forces users to use Direct Get (read from followers):

Until nats-server has Read-after-Write consistency (issue #6557), disabling Direct Get is the ~recommended workaround (per discussion in #7281) to get more reliable reads (with the main gap still being leader changes).

Contribution

No response

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