vectordotdev / vector

A high-performance observability data pipeline.
https://vector.dev
Mozilla Public License 2.0
17.42k stars 1.51k forks source link

Migrate to async_nats NATS client #15534

Closed makarchuk closed 1 year ago

makarchuk commented 1 year ago

A note for the community

Use Cases

Vector currently uses nats::asynk client which is not a recommended way of using it, as newer official async api exists in a form of async_nats crate. nats crate is described as "Legacy synchronous client that supports" in it's own repo, which also mentions that This client will be deprecated soon.

Furthermore nats::asynk lacks async support for NATS JetStream (there's a sync one, but that doesn't fit for vector's purposes), and JetStream seems to be a pretty good candidate for becoming another Vector source (I'll create a separate feature request for this later and will try to contribute this client myself).

So it seems that migrating to a more modern and async native async_nats client would be benifitial for a project as a whole.

Wanted to mention that I'm sorry if I failed to follow a proper process here. I tried my best and please feel free to point out any mistakes I've made.

Attempted Solutions

No response

Proposal

I have prepared an MR that implements such a migration. Although there're a couple of things that concern me and I would like to hear an opinion on those:

References

15533

Version

No response

paolobarbolini commented 1 year ago

FYI I'm making a new attempt at migrating to it in #18165