benthosdev / benthos

Fancy stream processing made operationally mundane
https://www.benthos.dev
MIT License
7.68k stars 752 forks source link

Add jetstream domain to kv-components #2539

Open n-holmstedt opened 3 weeks ago

n-holmstedt commented 3 weeks ago

I noticed that the nats components using jetstream is missing the ability to specify jetstream-domain allowing a client to use jetstream-enabled leaf nodes. However, I opted for changing the key-value store components since these already use the new jetstream api and the old ones prob. needs to be rewritten at some point anyway.

I also took the liberty to add username and password authentication to the nats auth section. This isn't really something one would want to use in production, but helps with testing leafnodes connectivity since they need to be bound with an account and connects user credentials (preferably username/password when testing locally).

This is my first PR for Benthos so i'm not super-familiar with the structure. Things seemed to fit, runs tests/compiles, and works when i try it locally so hopefully it isn't that bad. Some integration-tests failed, but that seems to have nothing to do with the changes i made.