Netflix / Hystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
24.15k stars 4.71k forks source link

hystrix.command.* - unknown property #1659

Open venkattarigopula opened 7 years ago

venkattarigopula commented 7 years ago

Hello,

When hystrix command properties are entering in bootstrap.yml file, error showing that hystrix.command unknown property. I am using spring boot 1.5.6 ( cloud Camden.SR5 release )

I am setting the following property hystrix: command: default: execution: isolation: thread: timeoutInMilliseconds:5000

image

after service running , from actuator endpoint configprops , i could not find any property hystrix.command or something.

Please help, Regards, Venkat.

615Manu commented 7 years ago

I think the hystrix command properties should be set in the application.yml/properties file instead of bootstrap.yml.

venkattarigopula commented 7 years ago

Hi 615Manu, thanks for your response. I have tried with application.yml. There also issue persists. unknown property comes up.

vision-ken commented 7 years ago

same issue to me.

codefinity commented 6 years ago

Same Issue with Finchley.M9 while using with ZUUL.

vimalkrishna commented 6 years ago

Same issue with Finchley.M9</spring-cloud.version> With spring-cloud-starter-netflix-hystrix

jpestanasalinas commented 4 years ago

Same issue with Hoxton.SR8 version. Anyone has found a solution? Thank you!

jpestanasalinas commented 4 years ago

Same issue with Hoxton.SR8 version. Anyone has found a solution? Thank you!

I found an error in my dependencies. I had imported 'spring-cloud-netflix-hystrix' and I should to import 'spring-cloud-starter-netflix-hystrix'.

SatvikNema commented 3 years ago

facing the same issue in application.yml

vishnu-20 commented 3 years ago

Hi Guys, I was also facing these issues. Now its done. have look at the pom.xml below Hope it might help you guys.


@HystrixCommand(fallbackMethod = "getEmployeeDetailsFallBack" ,commandProperties = {

         @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "10"),
            @HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "1000"),
            @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "50"),
            @HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "10000")    

})

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.employee.irs</groupId>
<artifactId>EmpoloyeeDetails</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>EmpoloyeeDetails</name>
<description>Demo project for Spring Boot</description>
<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Hoxton.SR9</spring-cloud.version>
</properties>
<dependencies>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
    </dependency>
     <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter</artifactId>
    </dependency>

</dependencies>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

19apoorv97 commented 3 years ago

@vishnu-20 where to add these in zuul proxy main file? also please tell me the dependancy to add these annotations @HystrixCommand(fallbackMethod = "getEmployeeDetailsFallBack" ,commandProperties = {

     @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "10"),
        @HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "1000"),
        @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "50"),
        @HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "10000")    

})