【发布时间】:2017-07-11 19:29:58
【问题描述】:
我的技术栈包括以下内容
- Eureka 发现服务器
- 祖尔网关
- Spring 配置服务器
- Hystrix 仪表板
- 我的核心服务启用了 Hystrix 流。
Hystrix 仪表板工作正常,因为我可以使用暴露在我的服务之外的 hystrics.stream 进行流式传输。
但是,每当我尝试将涡轮机添加到此堆栈时,/turbine.stream 只会在浏览器上重复返回 data: {"type":"Ping"},因此 Hystrix 仪表板显示 Unable to connect to Command Metric Stream
有人可以帮我找出我哪里出错了吗?
这是我的涡轮机关键配置。 TurbineAppliation 类只是一个带有 @EnableTurbineStream 的 springboot 应用程序,因此不在下面列出。
pom 依赖:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.1.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-client</artifactId>
</dependency>
<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>
</dependencies>
bootstrap.yml:(请忽略 eureka 特定的配置,如果我自己没有调整它们无关紧要)。配置服务器和 eureka 设置对于所有其他运行良好的组件都是相同的。
spring:
application:
name: Turbine
cloud:
config:
enabled: true
discovery:
enabled: true
serviceId: ConfigServer
management:
security:
enabled: false
eureka:
instance:
leaseRenewalIntervalInSeconds: 10
# leaseExpirationDurationInSeconds: 2
preferIpAddress: true
ipAddress: 127.0.0.1
client:
serviceUrl:
defaultZone: http://localhost:8761/discovery/eureka/ ---discovery is my eureka context root required for my app
application.yml
server:
port: 7980
info:
component: Turbine App
turbine:
aggregator:
clusterConfig: MY-SERVICE
appConfig: MY-SERVICE
clusterNameExpression: new String('default')
InstanceMonitor:
eventStream:
skipLineLogic:
enabled: false
【问题讨论】:
-
你有从rabbit mq读取的涡轮流,你有hystrix流(即到rabbit)还是只有HTTP?
-
是的,我的 hysterix 流也在使用 rabbit,它工作得很好
-
@spencergibb - 你对出了什么问题有任何想法吗?
-
github.com/spring-cloud/spring-cloud-stream/issues/810 下周将会有一个带有修复的 Camden.SR6。
-
好的,等待修复
标签: spring-boot spring-cloud turbine