dubbo配置多协议
多协议
Dubbo 允许配置多协议,在不同服务上支持不同协议或者同一服务上同时支持多种协议。
不同服务不同协议
不同服务在性能上适用不同协议进行传输,比如大数据用短连接协议,小数据大并发用长连接协议
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd"> <dubbo:application name="world" /><dubbo:registry id="registry" address="10.20.141.150:9090" username="admin" password="hello1234" /><!-- 多协议配置 --><dubbo:protocol name="dubbo" port="20880" /><dubbo:protocol name="rmi" port="1099" /><!-- 使用dubbo协议暴露服务 --><dubbo:service interface="com.alibaba.hello.api.HelloService" version="1.0.0" ref="helloService" protocol="dubbo" /><!-- 使用rmi协议暴露服务 --><dubbo:service interface="com.alibaba.hello.api.DemoService" version="1.0.0" ref="demoService" protocol="rmi" />
</beans>
多协议暴露服务
需要与 http 客户端互操作
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd"><dubbo:application name="world" /><dubbo:registry id="registry" address="10.20.141.150:9090" username="admin" password="hello1234" /><!-- 多协议配置 --><dubbo:protocol name="dubbo" port="20880" /><dubbo:protocol name="hessian" port="8080" /><!-- 使用多个协议暴露服务 --><dubbo:service id="helloService" interface="com.alibaba.hello.api.HelloService" version="1.0.0" protocol="dubbo,hessian" />
</beans>
dubbo配置多协议相关推荐
- dubbo配置参考手册
配置参考手册 <dubbo:service/> <dubbo:reference/> <dubbo:protocol/> <dubbo:registry/&g ...
- dubbo 配置及分析
一.配置 <!-- Dubbo --> <dependency> <groupId>com.alibaba</groupId> <artifact ...
- dubbo配置参考手册,dubbo各个标签解析
配置参考手册 <dubbo:service/> <dubbo:reference/> <dubbo:protocol/> <dubbo:registry/&g ...
- Dubbo(八)使用配置类方式实现服务提供者消费者dubbo配置
本文章基于改dubbo系列前两篇文章中项目进行调整修改 Dubbo(六)使用SpringBoot搭建dubbo服务提供者工程 Dubbo(七)使用SpringBoot搭建dubbo消费者工程 主要调整 ...
- Dubbo配置加载问题
问题引出,从dubbo2升级到了dubbo3版本,出现了一些消费方调用超时的现象,通过日志发现异常信息中的timeout竟然是1000ms,明明在暴漏接口的时候指定了超时时间,为什么没有生效. 经过d ...
- DUBBO配置规则详解
DUBBO在配置这一块做的确实很完美,提供很很多参数,以及提供了多种渠道.下面进入正题,看看DUBBO怎么加载配置的.在讲这些之前,先给大家介绍一下在DUBBO源码层面定义了哪些类来存储各个模块的配置 ...
- dubbo配置属性-快捷查询表
1.服务端配置属性 xml中服务端全局配置 标签:<dubbo:service /> 属 性 类 型 是否必填 缺省值 描 述 interface class 必填 无 服务接 ...
- dubbo配置(一)
目录 1.配置原则 2.重试次数 3.超时时间 (1)消费端 (2)服务端 (3)配置原理 (4)版本号 1.配置原则 JVM 启动 -D 参数优先,这样可以使用户在部署和启动时进行参数重写,比如在启 ...
- Dubbo 配置http协议
一 服务提供者 在服务提供者中,需要添加 注释为http协议支持 的依赖jar包,修改启动类的启动方式,添加provider.xml配置 <?xml version="1.0" ...
最新文章
- IIS报错,App_global.asax.×××.dll拒绝访问
- spark环境搭建(idea版本)
- Python3与OpenCV3.3 图像处理(九)--高斯模糊
- bzoj4415 [Shoi2013]发牌 线段树
- 2016年中国国际信息通信展览会在北京开幕
- 佛祖保佑代码无bug图片_程序员都有哪些奇趣的代码注释,细思极恐
- js排序算法详解-堆排序
- iOS 点击返回键崩溃的未解之谜
- 《Flash MX从入门到精通》内容简介
- linux找不到fastboot驱动下载,fastboot 刷机傻瓜教程
- fdfs-文件上传信息返回详情
- 使用高德地图实现根据地名查询经纬度
- 【Tensorflow】报错:FailedPreconditionError: Attempting to use uninitialized value keep_prob_7
- 【ArcGIS】地表模型生成和显示
- EOS竞猜游戏SKR EOS遭黑客攻击,成都链安已于前天发出预警
- 幸福工厂超级计算机有什么用,幸福工厂全替换配方简评
- 通过Java生成.pfx(.p12)证书文件
- java课外兴趣小组管理系统_课外兴趣小组计划
- 解决方案:SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to
- 兔子繁殖问题。假设有一对小兔子,一个月后成长为一对大兔子,从	第二个月开始,每对大兔子生一对小兔子。不考虑兔子的死亡,求第n个月的兔子总对数