micronaut-discovery-client
micronaut-discovery-client copied to clipboard
Create a Blocking Configuration Client
Currently, ConfigurationClient has a reactive API.
However, DistributedPropertySourceLocator blocks Block.
I think we should create a BlockingConfigurationClient and heavily simplify code such as SpringCloudConfigurationClient.
@micronaut-projects/core-developers thoughts?
What's the advantage of a new API? You can just block and return a Publishers.just, if you want. It shouldn't cause any issues.
the advantage is to provide to provide an API which does not force developers to write reactive code.
Also, if you don't have any @ConfigurationClient and only @BlockingConfigurationClient you don't go into unnecessary reactive paths even if it is just doing Publishers::just
Given that I often see reactive code as unnecessarily complex, I'm +1 :)
How about you just rewrite the existing clients to block and use Publishers.just, and then for 5.0 we can do the api change. That way we don't need two apis that do the same thing living next to each other.