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

19th
Oct 2016
Anthony
@AnthonySlabinck
Oct 19 2016 10:07
Hi. We are using spring-cloud using Feign Hystrix. For one specific client we want to override hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds. How do we access the underlying created HystrixCommand to override that setting?
Dave Syer
@dsyer
Oct 19 2016 10:24
Why do you need that? Can't you just use application properties?
Anthony
@AnthonySlabinck
Oct 19 2016 10:49
You mean by setting a property like 'hystrix.command.<name of command created by feignclient>.execution.isolation.thread.timeoutInMilliseconds'?
Dieter Hubau
@Turbots
Oct 19 2016 10:50
problem is that we dont know what the name of the configured hystrixcommand is
Dave Syer
@dsyer
Oct 19 2016 11:01
Right. But it has a name.
So if you know it you can configure it
IIRC it defaults to the method signature
Dieter Hubau
@Turbots
Oct 19 2016 11:02
when we configure a @FeignClient with a Hystrix fallback class, we can’t really see what the corresponding HystrixCommand’s name is
Dave Syer
@dsyer
Oct 19 2016 11:02
You could observe it in the /hystrix.stream endpoint, once some data start flowing
Dieter Hubau
@Turbots
Oct 19 2016 11:02
oh, okay, thanks
Dave Syer
@dsyer
Oct 19 2016 11:02
If it doesn't say in the user guide what the default command name is, it should
Dieter Hubau
@Turbots
Oct 19 2016 11:03
I’ll chec
Anthony
@AnthonySlabinck
Oct 19 2016 11:36
The name of the HystrixCommand is indeed the method signature, but we can't seem to find this in the user guide. Thank you for your help!
We also added the hystrix-dashboard dependency (Single Hystrix App) but we get following error connecting to the stream 'Unable to connect to Command Metric Stream.
'
Dave Syer
@dsyer
Oct 19 2016 12:18
You want your app to be a stream and a dashboard?
Anthony
@AnthonySlabinck
Oct 19 2016 12:19
Yes
Dave Syer
@dsyer
Oct 19 2016 12:19
I never tried it
I guess it should work. Is the stream definitely there?
How did you connect?
Anthony
@AnthonySlabinck
Oct 19 2016 12:21
by submitting the url ending on hystrix.stream in the input field, then looking at the console shows following error --> EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
Dave Syer
@dsyer
Oct 19 2016 12:26
I guess that's a clue?
Anthony
@AnthonySlabinck
Oct 19 2016 12:28
No it is working. I had to add @EnableHystrix on the configuration class. We were already using Hystrix Feign clients so I thought it was already there.
Amin Abu-Taleb
@aabutaleb
Oct 19 2016 13:52
Hi, does any of you know if it's possible to make a pre filter in zuul and apply it to certain routes only? I can't find anything in the docs
Dave Syer
@dsyer
Oct 19 2016 14:01
A ZuulFilter has a boolean shouldFilter()
You can use that to skip routes you are not interested in
Amin Abu-Taleb
@aabutaleb
Oct 19 2016 14:03
can it be done dynamically using the application.yml file?
In my case is basically the opposite. I just want that filter to apply to one or two routes, ignoring the rest
Dave Syer
@dsyer
Oct 19 2016 14:07
A custom filter can do anything it wants
You can look up properties in the config files using @ConfigurationProperties
Amin Abu-Taleb
@aabutaleb
Oct 19 2016 14:08
This message was deleted
Amin Abu-Taleb
@aabutaleb
Oct 19 2016 14:10
thanks!
pradeepkusingh
@pradeepkusingh
Oct 19 2016 15:12
@spencergibb : Is there a plan to fix this issue ?