【问题标题】:Hystrix Synchronous usageHystrix 同步使用
【发布时间】:2017-03-25 11:45:01
【问题描述】:

对于通过 Hystrix 同步调用 REST api,HystrixCommand.observe()HystrixCommand.execute() 哪个更好?
如果首选返回 Observable,那么是使用阻塞(toBlocking().single())还是非阻塞(.subscribe())的方式读取数据更好?

【问题讨论】:

    标签: rx-java observable blocking nonblocking hystrix


    【解决方案1】:

    HystrixCommand.execute() 用于同步执行,HystrixCommand.observe() 用于异步执行(返回 Observable),按照 hystrix doc

    【讨论】:

      猜你喜欢
      • 2018-05-27
      • 2017-10-18
      • 2017-01-10
      • 2017-04-06
      • 2018-04-01
      • 1970-01-01
      • 2020-01-25
      • 2016-01-18
      • 2018-12-27
      相关资源
      最近更新 更多