我的设置是spring boot cloud,使用netflix library,我设法让Turbine从一个服务中聚合Hystrix度量。然而,当我添加更多的服务时,我看不到它们。
这是我的设置(也上传到github中,网址是:Project On github
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
@ComponentScan("com.bootnetflix")
public class FlightIntegrationApplication {
..
}
application.yaml
server:
port: 0
eureka:
instance:
leaseRenewalIntervalInSeconds: 10
metadataMap:
instanceId: ${vcap.application.instance_id:${spring.application.name}:${spring.application.instance_id:${random.value}}}
client:
registryFetchIntervalSeconds: 5
bootstrap.yaml
spring:
application:
name: flight-integration-service
服务2:
优惠券服务:
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
@ComponentScan("com.bootnetflix")
public class CouponServiceApp {
..
}
application yaml:
server:
port: 0
eureka:
instance:
leaseRenewalIntervalInSeconds: 10
metadataMap:
instanceId: ${vcap.application.instance_id:${spring.application.name}:${spring.application.instance_id:${random.value}}}
client:
registryFetchIntervalSeconds: 5
尤里卡应用程序服务:
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
Hystrix dashboard service:
@SpringBootApplication
@EnableHystrixDashboard
@Controller
public class HystrixDashboardApplication {
info:
component: Hystrix Dashboard
endpoints:
restart:
enabled: true
shutdown:
enabled: true
server:
port: 7979
logging:
level:
ROOT: INFO
org.springframework.web: DEBUG
eureka:
client:
region: default
preferSameZone: false
us-east-1:
availabilityZones: default
instance:
virtualHostName: ${spring.application.name}
spring:
application:
name: hystrixdashboard
EnableAutoConfiguration
@EnableTurbine
@EnableEurekaClient
@EnableHystrixDashboard
public class TurbineApplication {
info:
component: Turbine
PREFIX:
endpoints:
restart:
enabled: true
shutdown:
enabled: true
server:
port: 8989
management:
port: 8990
eureka:
instance:
leaseRenewalIntervalInSeconds: 10
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
#turbine:
# aggregator:
# clusterConfig: FLIGHT-INTEGRATION-SERVICE,COUPON-SERVICE
#appConfig: flight-integration-service,coupon-service
#turbine:
# clusterNameExpression: 'default'
# appConfig: flight-integration-service,coupon-service
turbine:
appConfig: coupon-service,flight-integration-service
clusterNameExpression: new String('default')
#As you can see I tried diff configurations.
由@SpencerGibb建议解决。我向每个客户端添加了spring-boot-starter-amqp的依赖项,并创建了rabbitMQ代理。Turbine正在通过amqp聚合所有消息,我能够在Hystrix仪表板服务器上看到聚合的所有Hystrix命令
我正在使用turbine来汇总Hystrix的数据。当我尝试用hystrix(localhost:23002/hystrix.strean)获取数据时,一切都很顺利。然而,当我尝试使用turbine获取数据时,它显示什么也没有。这是我的配置。 我可以通过URL:localhost:23002/hystrix.stream获取数据我的目标是通过URL localhost:23111/turbine.
启动日志的尾端如下所示: 因此,PolicyService似乎成功连接到message Broker。 Turbine AMQP服务器的日志结束: 编辑:下面的异常是当我停止收听涡轮流时抛出的,而不是当我尝试用仪表板收听时抛出的。 我对Turbane-AMQP的依赖关系如下:
我正在开发Spring Boot V2.2.6。Release+Eureka+Hystrix和Turbine。在发这个问题之前,我浏览了很多链接,比如: > Spring启动式涡轮 Spring Boot+Eureka服务器+Hystrix with Turbine:empty pom.xml
我有一个elasticsearch请求如下: 我想在这个请求中添加分页,就像 我搜索了很多,找到了一个关于它的链接:https://github.com/elastic/elasticsearch/issues/4915. 但我仍然没有得到实现方法。 有没有办法通过Elasticsearch本身而不是我的应用程序来实现它?