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

21st
Mar 2016
David Welch
@dwelch2344
Mar 21 2016 15:13
Got it. Hadn't specified an instanceId. we're officially up and running in our dev environment
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:28
Hi! Is there any option to create request aware Ribbon rule for Feign in Spring Cloud?
Spencer Gibb
@spencergibb
Mar 21 2016 19:28
request aware ribbon is hard, because it runs on a separate thread.
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:30
so I need to implement everything from scratch?
Dave Syer
@dsyer
Mar 21 2016 19:32
or use semaphore isolation ?
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:33
but in IRule there is no information about request
Spencer Gibb
@spencergibb
Mar 21 2016 19:33
nope
Dave Syer
@dsyer
Mar 21 2016 19:33
no, so it would have to come from a thread local
Spring makes one available
Spencer Gibb
@spencergibb
Mar 21 2016 19:33
Dave Syer
@dsyer
Mar 21 2016 19:34
So you only need to carry that context into the Hystrix command
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:34
I saw this article @spencergibb but as I undertand it uses Zuul to provide such routing
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:40
I see Ribbon is closed for extending and I'll be hard to add such feature, as it's buried deep inside LoadBalancerCommand
OK, thanks
Dave Syer
@dsyer
Mar 21 2016 19:42
Spring Cloud provides plenty of hooks for modifying ribbon
(Hence the link to Jakub's article, which is not Zuul specific really.)
Jakub Kubryński
@jkubrynski
Mar 21 2016 19:43
Yep, but as I can see server is chosen in LoadBalancerCommand.submit method
David Welch
@dwelch2344
Mar 21 2016 20:24
Is there a way to omit the health check created in spring-cloud-consul-discovery?
Spencer Gibb
@spencergibb
Mar 21 2016 20:24
the http check?
@dwelch2344 :arrow_up:
David Welch
@dwelch2344
Mar 21 2016 20:27
yeah
looks like it's created in ConsulLifecycle
we'd like to omit those when deving local, since we're throwing all our infrastructure in docker and consul can't ping out to the host OS. make sense?
Spencer Gibb
@spencergibb
Mar 21 2016 20:28
not currently
yeah
David Welch
@dwelch2344
Mar 21 2016 20:48
Simple enough work around:
    @Bean
    public ConsulLifecycle consulLifecycle(ConsulDiscoveryProperties discoveryProperties,
                                           HeartbeatProperties heartbeatProperties, ConsulClient consulClient) {
        return new ConsulLifecycle(consulClient, discoveryProperties, heartbeatProperties){
            @Override
            protected void register(NewService newService) {
                newService.setCheck(null);
                super.register(newService);
            }
        };
    }
Spencer Gibb
@spencergibb
Mar 21 2016 21:05
@dwelch2344 spring-cloud/spring-cloud-consul@e4fb366
David Welch
@dwelch2344
Mar 21 2016 21:22
<3 u
... it's a lot creepier with emojis. <3 u was less creepy
Spencer Gibb
@spencergibb
Mar 21 2016 21:22
haha :stuck_out_tongue_winking_eye:
David Welch
@dwelch2344
Mar 21 2016 23:08
Dude. This stuff is so awesome :D our team is blown away
Spencer Gibb
@spencergibb
Mar 21 2016 23:09
glad to hear. It’s nice to hear good things rather than just bugs ;-)