Skip to end of metadata
Go to start of metadata

thrift://

(+) (#)

2.3.0以上版本支持。
Thrift说明
Thrift是Facebook捐给Apache的一个RPC框架,参见:http://thrift.apache.org
dubbo thrift协议
当前 dubbo 支持的 thrift 协议是对 thrift 原生协议的扩展,在原生协议的基础上添加了一些额外的头信息,比如service name,magic number等。使用dubbo thrift协议同样需要使用thrift的idl compiler编译生成相应的java代码,后续版本中会在这方面做一些增强。

示例:https://github.com/alibaba/dubbo/tree/master/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/examples

依赖:

所有服务共用一个端口:(与原生Thrift不兼容)

Thrift不支持数据类型:

  • null值 (不能在协议中传递null值)
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. 三月 01, 2013

    Anonymous

    问个问题
    使用thrift生成的代码,如例子中的com.alibaba.dubbo.rpc.gen.thrift.Demo$Iface
    但是不使用thrift协议,使用dubbo协议
    这个时候zookeeper中会出现好多的252525252525这样的字符,会导致监控中心挂掉

    这个是什么原因啊?

    1. 八月 22, 2013

      Anonymous

      同样问题,跟踪发现是对%符号的转义做的有问题,这个对所有内部接口都存在问题

Add Comment