- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 spring boot 1.3.1 和 spring cloudl Brixtom.M4,在使用 springboot 1.3.1 时我发现 Turbine-AMQP 项目不再可用,我们现在有了 Spring Turbine Stream 项目。我用 rabbitmq 或 kafka 使用 SpringTurbine 并想监视在 Zuul 中注册的所有路由的 hystrix 流,我能够看到 zuul 的 hystrix.stream 并且也能够在 hystrix 仪表板中看到它,但不知道如何使用 Spring 涡轮流。在网上我找到了使用 Turbine AMQP 的代码和文档。
我有 zuul 服务器运行广告 http://localhost:9003/有依赖性
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
和 main.java 作为
@SpringBootApplication
@EnableZuulProxy
@EnableCircuitBreaker
public class EdgeServerApplication {
public static void main(String[] args) {
SpringApplication.run(EdgeServerApplication.class, args);
}
}
我还有 springTurbinestream 项目作为
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-turbine-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
org.springframework.boot Spring 启动启动器执行器
和 TurbineStream 的主类作为
@SpringBootApplication
@EnableTurbineStream
@EnableDiscoveryClient
public class WiziqTurbineApplication {
public static void main(String[] args) {
SpringApplication.run(WiziqTurbineApplication.class, args);
}
}
当我运行应用程序并转到 http://localhost:9003/hystrix.stream 时我看到了流但是如果我去 http://localhost:9003/turbine.stream它出错了。
我做错了什么?
最佳答案
您的客户端应用程序(在端口 9003 上)不应该有 /turbine.stream
。它应该将带有 hystrix 指标的消息发送给 rabbit(例如)。为此,您需要添加 spring-cloud-netflix-hystrix-stream
和 spring-cloud-starter-stream-rabbit
(就像您在服务器上所做的那样对于 *-turbine-*
依赖项)。
关于java - Spring Cloud Zuul CircuitBreaker 所有路由都通过 TurbineStream 而不是 Turbine-AMQP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34693054/
我有一个带有 Jubilee 的 Spring Boot 2.6.0-M1 项目(但问题可以从 2.4 开始重现)。在我的项目中,我使用了 Actuator、Spring cloud Kubernet
我遇到了@CircuitBreaker 没有重试的问题。 我有一个服务类(例如 UserService 类和方法名称 getUser),此方法调用另一个 Spring bean(例如 AppClien
是否可以监控所有Circuit Breakers限制和大小? Fielddata Breaker可以通过节点使用它来监控: GET _nodes/stats/breaker,http 但是我们如何监控
我有一个 spring boot 应用程序,它迭代地调用 mockserver通过 hystrix 命令实例化,带有回退方法。 模拟服务器被配置为始终以状态代码 500 响应。当在没有 circuit
我们正在使用响应式(Reactive)伪装客户端 (com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.0) 断路器版本
我尝试将重试策略与带有 Failsafe 的 CircuitBreaker 模式结合起来,但当尝试打开电路并中断时,我收到了 CircuitBreakerOpenException 异常。 https
CircuitBreaker CircuitBreaker主要分为以下几个模块:熔断器配置,熔断器注册,熔断事件消费者注册,熔断器状态机,熔断器状态及指标,熔断器事件,熔断器事件处理器,熔断器
我在 Gradle 中使用 Spring Boot 2.4。 这是我定义依赖项的方式: compile 'org.springframework.cloud:spring-cloud-starter-
我正在尝试为我的 Rest 客户创建一个综合弹性策略,为此我编写了以下内容: private static Policy circuitBreakerPolicy = Policy .Han
我正在尝试使用 Resilience4j 的 Spring Boot 注释。 当我使用注释时@CircuitBreaker(name = BACKEND,fallbackMethod = "fallb
尽管对于其他返回类型,Spring 重试回退机制似乎工作正常,但是当涉及到调用返回类型为 void 的 API 时。恢复方法根本没有被调用,我已经尝试了所有可能的方法参数类型并更改了后备方法的返回类型
Spring 的@Retryable 注释将重试三次(默认)并回退到@Recovery 方法。然而,@CircuitBreaker 将重试一次并在状态关闭时回退。 我想结合这两者:当断路器状态为关闭时
现在我在 hystrix 中使用 feign,结果发现,当 fallback 方法在 5 秒内调用 20 次时,Circuit 将变为 Open 状态。我怎样才能改变这个规则。例如,当fallback
我有一个通过 REST 调用依赖项的服务。服务和依赖是微服务架构的一部分,所以我想使用弹性模式。我的目标是: 有一个断路器来保护它挣扎时的依赖 限制调用可以运行的时间。该服务具有 SLA,并且必须在特
我正在使用 spring boot 1.3.1 和 spring cloudl Brixtom.M4,在使用 springboot 1.3.1 时我发现 Turbine-AMQP 项目不再可用,我们现
我是一名优秀的程序员,十分优秀!