nats-io / nats-io/nats.java

Provide KV Configuration builder from Json

Open
#1,579 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
Dominant language
Java
Stars
679
Forks
198
Avg merge
3h 39m
Merged PRs (30d)
9

Description

Proposed change

When working with jetstream, usually, we place stream configs in application resource directory.
We can upsert a stream with

StreamConfiguration.instance(jet.toJson())

, where jet is Json representation of corresponding stream config. This approach It is very easy and straightforward.
We've tried KV to see if we can replace Redis, but KV Configuration doesn't have similar builder and primary constructor is package private.

Use case

Storing stream config in application resource directory. Since configuration can be saved as Json, reverse mechanism would be nice.

Contribution

The change is very trivial, primary question if this proposal is acceptable at all.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the existing StreamConfiguration.instance(Json) entry point and the KV configuration class first. Confirm how KV configurations are represented and define completion as being able to reconstruct one from its JSON representation, with matching coverage for the new entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.