Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing consumer configuration in KV store subscription #891

Open
MENNAELMESALMY opened this issue May 16, 2024 · 2 comments
Open

Passing consumer configuration in KV store subscription #891

MENNAELMESALMY opened this issue May 16, 2024 · 2 comments
Labels
proposal Enhancement idea or proposal under review / on hold

Comments

@MENNAELMESALMY
Copy link

MENNAELMESALMY commented May 16, 2024

Proposed change

In KV store I want to be able to pass metadata, description, and idleheartbeat time (basically some consumer configuration) to the associated consumer but I can't find a way to pass this config, am I missing something?
if there is currently no way to do it, can we consider adding it?

used version: v1 1.1.5

Use case

Same use cases as having JetStream's consumer metadata, we want to be able to pass some metadata about the current consumers in the bucket.

Contribution

I am thinking of having a class similar to ConsumerConfigurationBuilder that we can optionally ( with a new constructor) pass to Watch/WatchAll but would like to know if there is a process to follow to have that.

@MENNAELMESALMY MENNAELMESALMY added the proposal Enhancement idea or proposal label May 16, 2024
@scottf
Copy link
Collaborator

scottf commented May 16, 2024

I could see having metadata and description because they are purely informational. Things like allowing custom heartbeats would have to be considered by the team and I can run it by them, and if we were going to allow some customization, we really should look at every possible consumer configuration that is available to us considering it's an ordered consumer under the covers.
Alternatively, remember KV is just something on top of JetStream, and all the code is there, so you could make your own watcher implementation, you would have to understand the way subjects are formed.

@MENNAELMESALMY
Copy link
Author

hi @scottf thanks for the quick reply.
We would like to continue to get any feature that the library provides smoothly so don't want to diverge too much with our own implementation.
If you agree that informational data is harmless (metadata, description) is harmless I could start drafting a PR for that.

For the heartbeat, I understand that the ordered consumer with a push subscription enables control flow (link) which enables the heartbeat but since it's not passed I assume that it's always the default I was looking to make it customizable. curious if that can lead to other side effects though, let me know what you and the team think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal under review / on hold
Projects
None yet
Development

No branches or pull requests

2 participants