nats-io / nats.net.v1

The official C# Client for NATS
Apache License 2.0
646 stars 154 forks source link

pass consumer information in kv store #894

Closed MENNAELMESALMY closed 2 weeks ago

MENNAELMESALMY commented 3 months ago

Implementation for #891

MENNAELMESALMY commented 3 months ago

My initial reaction is that I don't feel good about adding 10 more api. I would be more inclined if you add only 2 more (watch/watch all) with all possible parameters. Also, this has not been approved yet by the client team, I have raised the issue again.

Updated to include only three, I suppose I can make it only for list of keys as well, what do you think? Thanks for following up with the team, glad to hear their feedback.

scottf commented 2 months ago

@MENNAELMESALMY I have an idea for a solution. Since your main objective is to have the ability to know the consumer name, we could add something to KeyValueOptions like WithConsumerNamePrefix. We would then use the prefix for any consumers the client creates by itself. By adding it to the options we don't have to change or add any api, but would have to make sure all implementation is properly fixed. As far as meta data, I understand that this solution does not address that. Other than that, this idea was voted down by the client team, so I'm not sure what else to offer.