Closed Jarema closed 1 year ago
Until now, there was no way to easily add additional information about Stream or Consumer. The only solution was using Description field, which is a ugly workaround.
Description
https://github.com/nats-io/nats-server/pull/3797
The solution is to add new metadata field to both Consumer and Stream config. The metadata field would by a map of string keys and string values.
metadata
Consumer
Stream
string
The map would be represented in json as object with nested key/value pairs, which is a default way to marshal maps/hashmaps in most languages.
{ "durable_name": "consumer", ... // other consumer/stream fields "metadata": { "owner": "nack", "domain": "product" } }
Do we want to limit the size of metadata?
Signed-off-by: Tomasz Pietrek tomasz@nats.io
Improved ADR after discussions:
_nats
@ripienaar @wallyqs ADR updated, PR updated.
Metadata for Stream and Consumer
Context and Problem Statement
Until now, there was no way to easily add additional information about Stream or Consumer. The only solution was using
Description
field, which is a ugly workaround.Server PR
https://github.com/nats-io/nats-server/pull/3797
Design
The solution is to add new
metadata
field to bothConsumer
andStream
config. Themetadata
field would by a map ofstring
keys andstring
values.The map would be represented in json as object with nested key/value pairs, which is a default way to marshal maps/hashmaps in most languages.
Example
Open questions
Do we want to limit the size of
metadata
?Signed-off-by: Tomasz Pietrek tomasz@nats.io