Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

support hystrix config in global way #135

Closed
leizhiyuan opened this issue Dec 13, 2018 · 4 comments
Closed

support hystrix config in global way #135

leizhiyuan opened this issue Dec 13, 2018 · 4 comments

Comments

@leizhiyuan
Copy link
Contributor

leizhiyuan commented Dec 13, 2018

Your question

describe your question clearly

Your scenes

sofastack/sofa-rpc#189

Your advice

describe the advice or solution you'd like

Environment

  • Starter version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:
@leizhiyuan leizhiyuan changed the title support na co s support hystrix config in global way Dec 13, 2018
@ScienJus
Copy link
Member

想了一下,这个功能和 #136 都比较通用以及不难实现,而且有 sofastack/sofa-boot#282 也基本上很好用了。不过 SetterFactoryFallbackFactory 的配置就有些麻烦了。

感觉暂时应该先在 SofaHystrixConfig 开一个口子,允许用户直接调用 registerGlobalSetterFactoryregisterGlobalSetterFactory 注册全局的实现(当前是 DefaultSetterFactorynull)。

这样用户在 xml 和 annotation 下即使没办法获取 ConsumerConfig 注册不同的实现,也可以通过全局的实现中判断实际执行的 invoker/request 并返回不同逻辑,至少能让这两个功能在 xml 和 annotation 下可用?

意下如何?

(以及其他关于 hystrix 的相关支持和 issue,也都可以指派给我)

@leizhiyuan
Copy link
Contributor Author

可以的,那你可以提给sofaboot 上

#137 这个我就先不继续了。

@ScienJus
Copy link
Member

#136#137 应该没有变化,我先把 globalSetterFactory/globalFallbackFactory 加到 sofa-rpc 里,暂时让用户直接用 SofaHystrixConfig(无论是 sofa-rpc 还是 sofa-boot)。

@leizhiyuan
Copy link
Contributor Author

好的。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants