Open venkattarigopula opened 7 years ago
I think the hystrix command properties should be set in the application.yml/properties file instead of bootstrap.yml.
Hi 615Manu, thanks for your response. I have tried with application.yml. There also issue persists. unknown property comes up.
same issue to me.
Same Issue with Finchley.M9 while using with ZUUL.
Same issue with
Same issue with Hoxton.SR8 version. Anyone has found a solution? Thank you!
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'.
facing the same issue in application.yml
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">
<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>
@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")
})
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.