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.
2.3.0
and above supportedUsing the Dubbo Thrift protocol also requires the Thrift IDL compiler to compile and generate the corresponding Java code. Future versions will enhance this aspect.
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.8.0</version>
</dependency>
All services share a common port 2:
<dubbo:protocol name="thrift" port="3030" />
Refer to the example code in the Dubbo project