Class CosIdProxyClientTimeoutConfiguration

java.lang.Object
me.ahoo.cosid.spring.boot.starter.CosIdProxyClientTimeoutConfiguration

@Configuration(proxyBeanMethods=false) public class CosIdProxyClientTimeoutConfiguration extends Object
Applies ProxyProperties.getConnectTimeout() and ProxyProperties.getReadTimeout() to the CosId proxy clients, which otherwise wait for the proxy server without any timeout.

For blocking clients this replaces the request factory of the CosId proxy clients with a JDK HttpClient one; set both timeouts to zero to keep the application's own. The read timeout also bounds the machine id distribution at startup, so raise it if the proxy server's backend is slow to answer then.

  • Constructor Details

    • CosIdProxyClientTimeoutConfiguration

      public CosIdProxyClientTimeoutConfiguration()
  • Method Details

    • cosIdProxyRestClientTimeoutCustomizer

      @Bean public me.ahoo.coapi.spring.client.sync.RestClientBuilderCustomizer cosIdProxyRestClientTimeoutCustomizer(org.springframework.beans.factory.ObjectProvider<CosIdProperties> cosIdProperties)
      Blocking clients (RestClient).