Skip to content

Feature: Add updates_only field to nats kv #3985

@matthiasdv

Description

@matthiasdv

Problem

The nats_kv input redelivers all keys on restart. Which can be problematic if we're reading from a bucket with a large number of keys.

There is an include_history option. But this:

  • includes historical values for a given key when set to true
  • includes only the latest value for a given key when set to false

Suggested fix

Expose an updates_only toggle option which passes jetstream.UpdatesOnly() to the nats client when true . Only problem with this is that the nats client will throw an error when both updates_only and include_history are set to true:

nats: invalid jetstream option: updates only can not be used with include history

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