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

Ability to set consumer_name for Key Value store #5257

Open
suikast42 opened this issue Mar 29, 2024 · 2 comments
Open

Ability to set consumer_name for Key Value store #5257

suikast42 opened this issue Mar 29, 2024 · 2 comments
Labels
proposal Enhancement idea or proposal

Comments

@suikast42
Copy link

Proposed change

I am using the jnats java libraray an subsribe to a kv bucket with

 natKvStoreService.deviceAggregateStore().watchAll(new KeyValueWatcher() {

This generates on every boot different consumer name

jetstream_consumer_ack_floor_stream_seqaccount$Gaccount_id$Gclusterconsumer_descconsumer_leaderconsumer_nameDGix6yiNaWdomainis_consumer_leadertrueis_meta_leadertrueis_stream_leadertruemeta_leaderserver_idamovabi_infra.nats[0]server_nameamovabi_infra.nats[0]stream_leaderamovabi_infra.nats[0]stream_nameKV_DeviceAggregateStore 1087

Is it possible to add consumer name to KeyValueWatchOption ?

Use case

Listen to KV stores

Contribution

No response

@suikast42 suikast42 added the proposal Enhancement idea or proposal label Mar 29, 2024
@Jarema
Copy link
Member

Jarema commented Mar 29, 2024

Watch uses ordered consumer, which might be recreated on the fly if it discovers any issue.
Because of that, it needs random name.
However, we can consider adding possibility to fill the watcher's Consumer Metadata with information allowing you to identify it in other way than by checking on which stream it is, or which KV it is watching.

Would that address your case?

@suikast42
Copy link
Author

The stream name is already included.

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

No branches or pull requests

2 participants