We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
场景:有这样一个工程M1:假设他定义了一个接口A,这个接口A需要暴露给其他服务M2、M3等服务调用,但同时M1也需要调用接口A,为了避免后续服务拆分,所以在M1工程中都统一使用MotanReferer注入bean,但是问题来了,如果统一使用MotanReferer注入bean,如果发布的bean和注入bean都在同一个工程,但依旧会走motan那套服务发现,没有办法直接引用本地的bean进行交互调用。
The text was updated successfully, but these errors were encountered:
如果client和server是运行在一个jvm中,可以考虑使用injvm协议,injvm协议是对象调用,不会走网络协议栈。
<!-- 配置motan或者motan2协议。--> <motan:protocol id="motan2_protocol" name="motan2" ... /> <!-- 配置injvm协议。--> <motan:protocol id="injvm_protocol" name="injvm" /> <!-- 在basicSerice或者service配置中的export配置项里增加injvm协议导出。多个协议之间使用逗号分隔 --> <motan:basicService export="injvm_protocol,motan2_protocol:8002" ... />
used_protocol
motan_injvm
motan2_protocol
<!-- 配置motan/motan2协议 --> <motan:protocol id="motan2_protocol" name="motan2" ... /> <!-- 配置injvm协议--> <motan:protocol id="motan_injvm" name="injvm" /> <!-- 在basicReferer或者referer配置中,通过占位符指定实际使用的协议 --> <motan:basicReferer protocol="${used_protocol}" ... />
Sorry, something went wrong.
No branches or pull requests
场景:有这样一个工程M1:假设他定义了一个接口A,这个接口A需要暴露给其他服务M2、M3等服务调用,但同时M1也需要调用接口A,为了避免后续服务拆分,所以在M1工程中都统一使用MotanReferer注入bean,但是问题来了,如果统一使用MotanReferer注入bean,如果发布的bean和注入bean都在同一个工程,但依旧会走motan那套服务发现,没有办法直接引用本地的bean进行交互调用。
The text was updated successfully, but these errors were encountered: