Apache Dubbo binding spec

Detailed documentation on the Apache Dubbo binding component

Component format

To set up an Apache Dubbo binding, create a component of type bindings.dubbo. See this guide on how to create and apply a binding configuration.

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
spec:
  type: bindings.dubbo
  version: v1
  metadata:
    - name: interfaceName
      value: "com.example.UserService"
    - name: methodName
      value: "getUser"
    # Optional
    - name: version
      value: "1.0.0"
    - name: group
      value: "mygroup"
    - name: providerHostname
      value: "localhost"
    - name: providerPort
      value: "8080"

Spec metadata fields

FieldRequiredBinding supportDetailsExample
interfaceNameYOutputThe Dubbo interface name to invoke."com.example.UserService"
methodNameYOutputThe method name to call on the interface."getUser"
versionNOutputVersion of the Dubbo service."1.0.0"
groupNOutputGroup name for the Dubbo service."mygroup"
providerHostnameNOutputHostname of the Dubbo provider."localhost"
providerPortNOutputPort of the Dubbo provider."8080"

Binding support

This component supports output binding with the following operation:

  • create: invokes a Dubbo service method.

Example: Invoke a Dubbo Service

To invoke a Dubbo service using the binding:

{
  "operation": "create",
  "metadata": {
    "interfaceName": "com.example.UserService",
    "methodName": "getUser",
    "version": "1.0.0",
    "providerHostname": "localhost",
    "providerPort": "8080"
  },
  "data": {
    "userId": "12345"
  }
}

The data field contains the request payload sent to the Dubbo service method.