0
哪個更好HystrixCommand.observe()
或HystrixCommand.execute()
通過Hystrix同步調用REST API?
如果返回Observable是首選,那麼使用阻塞(toBlocking().single()
)還是非阻塞(.subscribe()
)方式讀取數據更好?Hystrix同步使用
哪個更好HystrixCommand.observe()
或HystrixCommand.execute()
通過Hystrix同步調用REST API?
如果返回Observable是首選,那麼使用阻塞(toBlocking().single()
)還是非阻塞(.subscribe()
)方式讀取數據更好?Hystrix同步使用
HystrixCommand.execute()用於同步執行& HystrixCommand.observe()用於按照hystrix doc異步執行(返回Observable)。