Thrift Protocol
Thrift Protocol
The Thrift protocol currently supported by Dubbo is an extension of the native Thrift protocol 1, adding some extra header information on top of the base protocol, such as service name, magic number, etc.
Note
Version 2.3.0
and above supported
Using the Dubbo Thrift protocol also requires the Thrift IDL compiler to compile and generate the corresponding Java code. Future versions will enhance this aspect.
Dependencies
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.8.0</version>
</dependency>
Configuration
All services share a common port 2:
<dubbo:protocol name="thrift" port="3030" />
Usage
Refer to the example code in the Dubbo project
Frequently Asked Questions
- Thrift does not support null values, meaning: null values cannot be passed in the protocol.
Feedback
Was this page helpful?
Yes No
Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)