繁体   English   中英

spring-cloud / spring-cloud-netflix,设置hystrix原始ID

[英]spring-cloud/spring-cloud-netflix, setting the hystrix origin id

我正在使用spring-cloud-samples / customer-stores示例,并按说明进行操作(特别是使用1.1.0-BUILD-SNAPSHOT)

看起来,当事物流到hystrix时,它将附加一个原始对象,例如以下内容:

"origin": {
  "host": "192.168.60.100",
  "port": 9000,
  "serviceId": "customers",
  "id": "customers:mysql:9000"
}

具体来说,似乎是从serviceIdspring.profiles.activeserver.port创建“ id”

当你有一个可以使用的这几个不同的组合,这一切正常,然而,当我运行或在不同的IP多种服务具有相同server.port或正在运行的几个搬运工容器具有相同server.port中,涡轮聚合会出现乱码,而且毫无意义,因为数据本身就在写入。

我想知道在Spring中是否有一种特定方法可以特别影响我们设置中该id的值。

只需按照hystrix.stream.queue.send-id=false在github上的帖子中所描述的那样设置hystrix.stream.queue.send-id=false即可解决此问题。https: //github.com/spring-cloud/spring-cloud-netflix/issues/740解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM