watermill icon indicating copy to clipboard operation
watermill copied to clipboard

[watermill-nats] smarter auto-provisioning

Open AlexCuse opened this issue 1 year ago • 2 comments

Noticed working on benchmarks that auto provisioning is especially slow on the publish side. I thought the NATS client did some caching of stream lookups but maybe not. It should be pretty simple to ensure auto-provisioning code is only run once (per topic) in the lifetime of a publisher.

Same mechanism won't hurt on subscriber side either so may as well use there also.

AlexCuse avatar Jun 08 '23 03:06 AlexCuse

The other option is to maybe build flexibility for override of the provisioned stream into SubscribeInitialize I think the kafka middleware might do something similar. Not sure where this would leave the publisher though.

AlexCuse avatar Jun 08 '23 03:06 AlexCuse

Maybe hold this for v2.1 and new jetstream API. https://natsbyexample.com/examples/jetstream/api-migration/go

AlexCuse avatar Jul 13 '23 02:07 AlexCuse