These are chat archives for spring-cloud/spring-cloud

Oct 2017
Oct 27 2017 07:54
Patrick Cornelißen
Oct 27 2017 08:14
Oct 27 2017 08:57
Niklas Herder
Oct 27 2017 11:34
Hi, I can't seem to find docs on how to create a FeignClient which uses Eureka manually, and not via the @FeignClient annotation... Could anyone give me a pointer in the right direction?
This is what I'm using now, but it uses the url variable as a literal address instead of a service id:
  public UserServiceClient userServiceClient(Contract feignContract,
                                             Encoder feignEncoder,
                                             Decoder feignDecoder,
                                             Client abSptPropertyOkHttpClient,
                                             SecuredRoutesProperties properties,
                                             @Value("${userservice.url:http://userservice}") String url) {
    return Feign.builder()
        .target(UserServiceClient.class, url);
Niklas Herder
Oct 27 2017 11:40
Or, alternatively: is it safe to have multiple @EnableFeignClients with their own basePackageClasses field, so that they don't get each other's RequestInterceptors ?
Mark Corkery
Oct 27 2017 12:06
Hi folks, are there any general rules of thumb or good articles on performance tuning ribbon connections? If searched but found little. I’ve tweaked coreSize’s for threadpools and also the MaxConnectionsPerHost properties for the ribbon client but haven’t seen a corresponding improvement in the amount of transaction that are successfully processing requests.
Seeing loads of these
Caused by: , code=9->SERVER_THROTTLED                                                                                                                                                                                                      │
Dave Syer
Oct 27 2017 12:08
You should probably use @FeignClient(configuration=...) rather than trying to do multiple base packages.
@herder ^^
Niklas Herder
Oct 27 2017 12:12

Thanks, though I tried that before, and that makes the clients which use my starter confused about which FeignClient to use, causing the app to refuse to start.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService' defined in class path resource [com/schibsted/publishing/auth/config/UserDetailsConfig.class]: Unsatisfied dependency expressed through method 'userDetailsService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.schibsted.publishing.auth.config.UserServiceClient': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'feign.Client' available: expected single matching bean but found 2: abLinkpulseOkHttpClient,abSptPropertyOkHttpClient

All clients seem to pick up all defined ReqestInterceptors even though I only want this interceptor to be used by one particular FeignClient

@dsyer Confuring it manually makes the client app less confused, but then I can't seem to get Ribbon/Eureka to kick in
This is in a starter, btw
I do this import in my autoconfig class, but I don't know if it's correct:
@Import( {FeignRibbonClientAutoConfiguration.class, FeignClientsConfiguration.class})
Niklas Herder
Oct 27 2017 12:40
Found the problem: the client abSptPropertyOkHttpClient was not a load-balanced one... :blush:
Sushant Borse
Oct 27 2017 13:28
hi, how to instrument spring-cloud-zuul in a best way ?
Patrick Cornelißen
Oct 27 2017 18:58
what do you want to measure?