Skip to content

Commit f074240

Browse files
robertojrojastmacamItalyPaleAle
authored
[PubSub RabbitMQ] Adds Component Metadata Schema (#3069)
Signed-off-by: robertojrojas <[email protected]> Signed-off-by: Roberto Rojas <[email protected]> Signed-off-by: Alessandro (Ale) Segala <[email protected]> Co-authored-by: Tiago Alves Macambira <[email protected]> Co-authored-by: Alessandro (Ale) Segala <[email protected]>
1 parent 33a5fd2 commit f074240

File tree

2 files changed

+197
-1
lines changed

2 files changed

+197
-1
lines changed

pubsub/rabbitmq/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
type rabbitmqMetadata struct {
3030
pubsub.TLSProperties `mapstructure:",squash"`
31-
ConsumerID string `mapstructure:"consumerID"`
31+
ConsumerID string `mapstructure:"consumerID" mdignore:"true"`
3232
ConnectionString string `mapstructure:"connectionString"`
3333
Protocol string `mapstructure:"protocol"`
3434
internalProtocol string `mapstructure:"-"`

pubsub/rabbitmq/metadata.yaml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
# yaml-language-server: $schema=../../component-metadata-schema.json
2+
schemaVersion: v1
3+
type: pubsub
4+
name: rabbitmq
5+
version: v1
6+
status: stable
7+
title: "RabbitMQ"
8+
urls:
9+
- title: Reference
10+
url: https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-rabbitmq/
11+
capabilities:
12+
- ttl
13+
authenticationProfiles:
14+
- title: "Connection string"
15+
description: "Authenticate using a connection string."
16+
metadata:
17+
- name: connectionString
18+
required: true
19+
sensitive: true
20+
description: "The RabbitMQ host address."
21+
example: '"amqp://[username][:password]@host.domain[:port]" "amqps://[username][:password]@host.domain[:port]"'
22+
- title: "Authenticate Using RabbitMQ properties"
23+
description: "RabbitMQ authentication by providing hostname, username and password."
24+
metadata:
25+
- name: hostname
26+
type: string
27+
description: |
28+
The RabbitMQ hostname.
29+
example: '"localhost"'
30+
- name: protocol
31+
description: |
32+
The RabbitMQ protocol.
33+
type: string
34+
example: '"amqp", "amqps"'
35+
- name: username
36+
type: string
37+
description: |
38+
The RabbitMQ username.
39+
example: '"username"'
40+
- name: password
41+
type: string
42+
sensitive: true
43+
description: |
44+
The RabbitMQ password.
45+
example: '"password"'
46+
- title: "Authenticate Using Connection string and External Sasl and TLS"
47+
description: "Authenticate using a connection string along with Exteranl Sasl and TLS."
48+
metadata:
49+
- name: connectionString
50+
required: true
51+
sensitive: true
52+
description: "The RabbitMQ host address."
53+
example: '"amqp://[username][:password]@host.domain[:port]" "amqps://[username][:password]@host.domain[:port]"'
54+
- name: caCert
55+
type: string
56+
required: true
57+
description: |
58+
Certificate authority certificate, required for using TLS.
59+
example: "-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"
60+
- name: clientCert
61+
type: string
62+
required: true
63+
sensitive: true
64+
description: |
65+
Client certificate, Required for using TLS.
66+
example: "-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"
67+
- name: clientKey
68+
type: string
69+
required: true
70+
sensitive: true
71+
description: |
72+
Client key, required for using TLS.
73+
example: "-----BEGIN RSA PRIVATE KEY-----\n<base64-encoded DER>\n-----END RSA PRIVATE KEY-----"
74+
- name: saslExternal
75+
type: bool
76+
description: |
77+
With TLS, should the username be taken
78+
from an additional field (e.g. CN.)
79+
See RabbitMQ Authentication Mechanisms.
80+
url:
81+
title: "RabbitMQ Authentication Mechanisms"
82+
url: "https://www.rabbitmq.com/access-control.html#mechanisms"
83+
default: '"false"'
84+
example: '"true"'
85+
metadata:
86+
- name: durable
87+
type: bool
88+
description: |
89+
Whether or not to use durable queues.
90+
default: '"false"'
91+
example: '"true", "false"'
92+
- name: publisherConfirm
93+
type: bool
94+
description: |
95+
If enabled, client waits for publisher confirmation after publishing
96+
a message.
97+
default: '"false"'
98+
example: '"true", "false"'
99+
- name: maxLen
100+
type: number
101+
description: |
102+
The maximum number of messages of a queue and its dead letter queue
103+
(if dead letter enabled by `enableDeadLetter`). If both `maxLen` and `maxLenBytes` are set then
104+
both will apply; whichever limit is hit first will be enforced.
105+
example: '1000'
106+
- name: maxLenBytes
107+
type: number
108+
description: |
109+
Maximum length in bytes of a queue and its dead letter queue (if dead
110+
letter enabled by `enableDeadLetter`). If both `maxLen` and `maxLenBytes` are set then both will
111+
apply; whichever limit is hit first will be enforced.
112+
example: '1048576'
113+
- name: concurrency
114+
type: string
115+
description: |
116+
Allows processing multiple messages in
117+
parallel (limited by the app-max-concurrency annotation, if configured).
118+
Set to single to disable parallel processing. In most situations there's
119+
no reason to change this.
120+
example: '"parallel", "single"'
121+
default: '"parallel"'
122+
allowedValues:
123+
- "parallel"
124+
- "single"
125+
- name: enableDeadLetter
126+
type: bool
127+
description: |
128+
Enable forwarding messages that cannot be handled to a dead-letter
129+
topic.
130+
default: '"false"'
131+
example: '"true", "false"'
132+
- name: prefetchCount
133+
type: number
134+
description: |
135+
Number of messages to prefetch. Consider changing this to a non-zero
136+
value for production environments. The value of "0" means that
137+
all available messages will be pre-fetched.
138+
default: '0'
139+
example: '2'
140+
- name: exchangeKind
141+
type: string
142+
description: |
143+
Exchange kind of the rabbitmq exchange.
144+
default: '"fanout"'
145+
allowedValues:
146+
- "fanout"
147+
- "topic"
148+
example: '"fanout","topic"'
149+
- name: deliveryMode
150+
type: number
151+
description: |
152+
Persistence mode when publishing messages.
153+
RabbitMQ treats "2" as persistent, all other numbers as non-persistent.
154+
default: '0'
155+
example: '2'
156+
- name: autoAck
157+
type: bool
158+
description: |
159+
Whether or not the queue consumer should auto-ack messages.
160+
default: '"false"'
161+
example: '"true", "false"'
162+
- name: deletedWhenUnused
163+
type: bool
164+
description: |
165+
Whether or not the queue should be configured to auto-delete.
166+
default: '"true"'
167+
example: '"true", "false"'
168+
- name: requeueInFailure
169+
description: |
170+
Whether or not to requeue when sending a negative acknowledgement
171+
in case of a failure.
172+
type: bool
173+
default: '"false"'
174+
example: '"true", "false"'
175+
- name: reconnectWaitSeconds
176+
description: |
177+
Reconnect wait in Seconds.
178+
type: duration
179+
default: '"3s"'
180+
example: '"10s"'
181+
- name: ttlInSeconds
182+
description: |
183+
Default Queue TTL.
184+
type: duration
185+
example: '"10"'
186+
- name: clientName
187+
type: string
188+
description:
189+
The client/connection name.
190+
example: '"my_client_name"'
191+
- name: heartBeat
192+
type: duration
193+
description:
194+
The heartbeat used for the connection.
195+
default: '"10s"'
196+
example: '"30s"'

0 commit comments

Comments
 (0)