Detailed documentation on the Kitex binding component


The binding for Kitex mainly utilizes the generic-call feature in Kitex. Learn more from the official documentation around Kitex generic-call. Currently, Kitex only supports Thrift generic calls. The implementation integrated into components-contrib adopts binary generic calls.

Component format

To setup an Kitex binding, create a component of type bindings.kitex. See the How-to: Use output bindings to interface with external resources guide on creating and applying a binding configuration.

kind: Component
  name: bindings.kitex
  type: bindings.kitex
  version: v1
  - name: hostPorts
    value: ""
  - name: destService
    value: "echo"
  - name: methodName
    value: "echo"
  - name: version
    value: "0.5.0"

Spec metadata fields

The InvokeRequest.Metadata for bindings.kitex requires the client to fill in four required items when making a call:

  • hostPorts
  • destService
  • methodName
  • version
Field Required Binding support Details Example
hostPorts Y Output IP address and port information of the Kitex server (Thrift) ""
destService Y Output Service name of the Kitex server (Thrift) "echo"
methodName Y Output Method name under a specific service name of the Kitex server (Thrift) "echo"
version Y Output Kitex version "0.5.0"

Binding support

This component supports output binding with the following operations:

  • get


When using Kitex binding:

  • The client needs to pass in the correct Thrift-encoded binary
  • The server needs to be a Thrift Server.

The kitex_output_test can be used as a reference. For example, the variable reqData needs to be encoded by the Thrift protocol before sending, and the returned data needs to be decoded by the Thrift protocol.


  "operation": "get",
  "metadata": {
    "hostPorts": "",
    "destService": "echo",
    "methodName": "echo",
  "data": reqdata