Skip to content

Commit 1c3351d

Browse files
JoshVanLmsfussell
andauthored
[1.16] Adds docs for Apache Dubbo (#4837)
* [1.16] Adds docs for Apache Dubbo Fixes #4798 Signed-off-by: joshvanl <me@joshvanl.dev> * Adds correct start version Signed-off-by: joshvanl <me@joshvanl.dev> --------- Signed-off-by: joshvanl <me@joshvanl.dev> Signed-off-by: Mark Fussell <markfussell@gmail.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
1 parent 49b53e0 commit 1c3351d

File tree

2 files changed

+103
-0
lines changed
  • daprdocs
    • content/en/reference/components-reference/supported-bindings
    • data/components/bindings

2 files changed

+103
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
type: docs
3+
title: "Apache Dubbo binding spec"
4+
linkTitle: "Dubbo"
5+
description: "Detailed documentation on the Apache Dubbo binding component"
6+
aliases:
7+
- "/operations/components/setup-bindings/supported-bindings/dubbo/"
8+
---
9+
10+
## Component format
11+
12+
To set up an Apache Dubbo binding, create a component of type `bindings.dubbo`.
13+
See [this guide]({{% ref "howto-bindings.md#1-create-a-binding" %}}) on how to create and apply a binding configuration.
14+
15+
```yaml
16+
apiVersion: dapr.io/v1alpha1
17+
kind: Component
18+
metadata:
19+
name: <NAME>
20+
spec:
21+
type: bindings.dubbo
22+
version: v1
23+
metadata:
24+
- name: interfaceName
25+
value: "com.example.UserService"
26+
- name: methodName
27+
value: "getUser"
28+
# Optional
29+
- name: version
30+
value: "1.0.0"
31+
- name: group
32+
value: "mygroup"
33+
- name: providerHostname
34+
value: "localhost"
35+
- name: providerPort
36+
value: "8080"
37+
````
38+
39+
{{% alert title="Note" color="info" %}}
40+
The Dubbo binding does not require authentication or secret configuration by default.
41+
However, if your Dubbo deployment requires secure communication, you can integrate Dapr's [secret store]({{% ref component-secrets.md %}}) for sensitive values.
42+
{{% /alert %}}
43+
44+
## Spec metadata fields
45+
46+
| Field | Required | Binding support | Details | Example |
47+
| ------------------ | :------: | --------------- | ----------------------------------------- | --------------------------- |
48+
| `interfaceName` | Y | Output | The Dubbo interface name to invoke. | `"com.example.UserService"` |
49+
| `methodName` | Y | Output | The method name to call on the interface. | `"getUser"` |
50+
| `version` | N | Output | Version of the Dubbo service. | `"1.0.0"` |
51+
| `group` | N | Output | Group name for the Dubbo service. | `"mygroup"` |
52+
| `providerHostname` | N | Output | Hostname of the Dubbo provider. | `"localhost"` |
53+
| `providerPort` | N | Output | Port of the Dubbo provider. | `"8080"` |
54+
55+
---
56+
57+
## Binding support
58+
59+
This component supports **output binding** with the following operation:
60+
61+
* `create`: invokes a Dubbo service method.
62+
63+
---
64+
65+
## Example: Invoke a Dubbo Service
66+
67+
To invoke a Dubbo service using the binding:
68+
69+
```json
70+
{
71+
"operation": "create",
72+
"metadata": {
73+
"interfaceName": "com.example.UserService",
74+
"methodName": "getUser",
75+
"version": "1.0.0",
76+
"providerHostname": "localhost",
77+
"providerPort": "8080"
78+
},
79+
"data": {
80+
"userId": "12345"
81+
}
82+
}
83+
```
84+
85+
The `data` field contains the request payload sent to the Dubbo service method.
86+
87+
---
88+
89+
## Related links
90+
91+
- [Basic schema for a Dapr component]({{% ref component-schema %}})
92+
- [Bindings building block]({{% ref bindings %}})
93+
- [How-To: Trigger application with input binding]({{% ref howto-triggers.md %}})
94+
- [How-To: Use bindings to interface with external resources]({{% ref howto-bindings.md %}})
95+
- [Bindings API reference]({{% ref bindings_api.md %}})

daprdocs/data/components/bindings/generic.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@
190190
features:
191191
input: false
192192
output: true
193+
- component: Apache Dubbo
194+
link: dubbo
195+
state: Alpha
196+
version: v1
197+
since: "1.7"
198+
features:
199+
input: false
200+
output: true
193201
- component: RocketMQ
194202
link: rocketmq
195203
state: Alpha

0 commit comments

Comments
 (0)