Skip to content

Commit e6e235b

Browse files
authored
DOC-1046 Add arguments field to amqp_09 input and output (#178)
1 parent 65b9ed5 commit e6e235b

File tree

3 files changed

+177
-155
lines changed

3 files changed

+177
-155
lines changed

DOC-1046_Add_arguments_field

Whitespace-only changes.

modules/components/pages/inputs/amqp_0_9.adoc

Lines changed: 110 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Common::
2121
--
2222
2323
```yml
24-
# Common config fields, showing default values
24+
# Common configuration fields, showing default values
2525
input:
2626
label: ""
2727
amqp_0_9:
2828
urls: [] # No default (required)
2929
queue: "" # No default (required)
30-
consumer_tag: ""
30+
consumer_tag: "" # Optional
3131
prefetch_count: 10
3232
```
3333
@@ -37,7 +37,7 @@ Advanced::
3737
--
3838
3939
```yml
40-
# All config fields, showing default values
40+
# All configuration fields, showing default values
4141
input:
4242
label: ""
4343
amqp_0_9:
@@ -47,8 +47,9 @@ input:
4747
enabled: false
4848
durable: true
4949
auto_delete: false
50+
arguments: {} # No default (optional)
5051
bindings_declare: [] # No default (optional)
51-
consumer_tag: ""
52+
consumer_tag: "" # Optional
5253
auto_ack: false
5354
nack_reject_patterns: []
5455
prefetch_count: 10
@@ -57,37 +58,37 @@ input:
5758
enabled: false
5859
skip_cert_verify: false
5960
enable_renegotiation: false
60-
root_cas: ""
61-
root_cas_file: ""
61+
root_cas: "" # Optional
62+
root_cas_file: "" # Optional
6263
client_certs: []
6364
```
6465
6566
--
6667
======
6768

68-
TLS is automatic when connecting to an `amqps` URL, but custom settings can be enabled in the `tls` section.
69+
TLS is automatically enabled when connecting to an `amqps` URL. However, you can customize <<tls, TLS settings>> if required.
6970

7071
== Metadata
7172

7273
This input adds the following metadata fields to each message:
7374

74-
- amqp_content_type
75-
- amqp_content_encoding
76-
- amqp_delivery_mode
77-
- amqp_priority
78-
- amqp_correlation_id
79-
- amqp_reply_to
80-
- amqp_expiration
81-
- amqp_message_id
82-
- amqp_timestamp
83-
- amqp_type
84-
- amqp_user_id
85-
- amqp_app_id
86-
- amqp_consumer_tag
87-
- amqp_delivery_tag
88-
- amqp_redelivered
89-
- amqp_exchange
90-
- amqp_routing_key
75+
- `amqp_content_type`
76+
- `amqp_content_encoding`
77+
- `amqp_delivery_mode`
78+
- `amqp_priority`
79+
- `amqp_correlation_id`
80+
- `amqp_reply_to`
81+
- `amqp_expiration`
82+
- `amqp_message_id`
83+
- `amqp_timestamp`
84+
- `amqp_type`
85+
- `amqp_user_id`
86+
- `amqp_app_id`
87+
- `amqp_consumer_tag`
88+
- `amqp_delivery_tag`
89+
- `amqp_redelivered`
90+
- `amqp_exchange`
91+
- `amqp_routing_key`
9192
- All existing message headers, including nested headers prefixed with the key of their respective parent.
9293

9394
You can access these metadata fields using xref:configuration:interpolation.adoc#bloblang-queries[function interpolations].
@@ -96,8 +97,9 @@ You can access these metadata fields using xref:configuration:interpolation.adoc
9697

9798
=== `urls`
9899

99-
A list of URLs to connect to. The first URL to successfully establish a connection will be used until the connection is closed. If an item of the list contains commas it will be expanded into multiple URLs.
100+
A list of URLs to connect to. This input attempts to connect to each URL in the list, in order, until a successful connection is established. It then continues to use that URL until the connection is closed.
100101

102+
If an item in the list contains commas, it is split into multiple URLs.
101103

102104
*Type*: `array`
103105

@@ -129,17 +131,14 @@ An AMQP queue to consume from.
129131

130132
=== `queue_declare`
131133

132-
Allows you to passively declare the target queue. If the queue already exists then the declaration passively verifies that they match the target fields.
133-
134+
Passively declares the <<queue, target queue>> to make sure a queue with the specified name exists and is configured correctly. If the queue exists, then the passive declaration verifies that fields specified in this object match the its properties.
134135

135136
*Type*: `object`
136137

137-
138138
=== `queue_declare.enabled`
139139

140140
Whether to enable queue declaration.
141141

142-
143142
*Type*: `bool`
144143

145144
*Default*: `false`
@@ -148,34 +147,96 @@ Whether to enable queue declaration.
148147

149148
Whether the declared queue is durable.
150149

151-
152150
*Type*: `bool`
153151

154152
*Default*: `true`
155153

156154
=== `queue_declare.auto_delete`
157155

158-
Whether the declared queue will auto-delete.
159-
156+
Whether the declared queue auto-deletes when there are no active consumers.
160157

161158
*Type*: `bool`
162159

163160
*Default*: `false`
164161

165-
=== `bindings_declare`
162+
=== `queue_declare.arguments`
166163

167-
Allows you to passively declare bindings for the target queue.
164+
Arguments for server-specific implementations of the queue (optional). You can use arguments to configure additional parameters for queue types that require them. For more information about available arguments, see the https://github.com/rabbitmq/amqp091-go/blob/b3d409fe92c34bea04d8123a136384c85e8dc431/types.go#L282-L362[RabbitMQ Client Library^].
168165

166+
*Type*: `object`
169167

170-
*Type*: `array`
171168

169+
```yml
170+
# Examples
171+
172+
arguments:
173+
x-max-length: 1000
174+
x-max-length-bytes: 4096
175+
x-queue-type: quorum
176+
```
177+
178+
179+
|===
180+
| Argument | Description | Accepted values
181+
182+
| `x-queue-type`
183+
| Declares the type of queue.
184+
| Options: `classic` (default), `quorum`, `stream`, `drop-head`, `reject-publish`, and `reject-publish-dlx`.
185+
186+
| `x-max-length`
187+
| The maximum number of messages in the queue.
188+
| A non-negative integer.
189+
190+
| `x-max-length-bytes`
191+
| The maximum size of messages (in bytes) in the queue.
192+
| A non-negative integer.
193+
194+
| `x-overflow`
195+
| Sets the queue's overflow behavior.
196+
| Options: `drop-head` (default), `reject-publish`, `reject-publish-dlx`.
197+
198+
| `x-message-ttl`
199+
| The duration (in milliseconds) that messages remain in the queue before they expire and are discarded.
200+
| A string that represents the number of milliseconds. For example, `60000` retains messages for one minute.
201+
202+
| `x-expires`
203+
| The duration after which the queue automatically expires.
204+
| A positive integer.
205+
206+
| `x-max-age`
207+
| The duration (in configurable units) that streamed messages are retained on disk before they are discarded.
208+
| Options: `Y`, `M`, `D`, `h`, `m`, `s`. For example, `7D` retains messages for a week.
209+
210+
| `x-stream-max-segment-size-bytes`
211+
| The maximum size (in bytes) of the segment files held on disk.
212+
| A positive integer. Default: `500000000` (approximately 500 MB).
213+
214+
| `x-queue-version`
215+
| The version of the classic queue to use.
216+
| Options: `1` or `2`.
217+
218+
| `x-consumer-timeout`
219+
| The duration (in milliseconds) that a consumer can remain idle before it is automatically canceled.
220+
| A positive integer that represents the number of milliseconds. For example, `60000` sets a timeout duration of one minute.
221+
222+
| `x-single-active-consumer`
223+
| When set to `true`, a single consumer receives messages from the queue even when multiple consumers are subscribed to it.
224+
| A boolean.
225+
226+
|===
227+
228+
=== `bindings_declare`
229+
230+
Passively declares the bindings of the target queue to make sure they exist and are configured correctly. If the bindings exist, then the passive declaration verifies that fields specified in this object match them.
231+
232+
*Type*: `array`
172233

173234
```yml
174235
# Examples
175236

176237
bindings_declare:
177-
- exchange: foo
178-
key: bar
238+
- exchange: my_exchange
239+
key: my_routing_key
179240
```
180241

181242
=== `bindings_declare[].exchange`
@@ -198,7 +259,7 @@ The key of the declared binding.
198259

199260
=== `consumer_tag`
200261

201-
A consumer tag.
262+
A consumer tag to uniquely identify the consumer.
202263

203264

204265
*Type*: `string`
@@ -207,17 +268,17 @@ A consumer tag.
207268

208269
=== `auto_ack`
209270

210-
Acknowledge messages automatically as they are consumed rather than waiting for acknowledgments from downstream. This can improve throughput and prevent the pipeline from blocking but at the cost of eliminating delivery guarantees.
211-
271+
Set to `true` to automatically acknowledge messages as soon as they are consumed rather than waiting for acknowledgments from downstream. This can improve throughput and prevent the pipeline from becoming blocked, but delivery guarantees are lost.
212272

213273
*Type*: `bool`
214274

215275
*Default*: `false`
216276

217277
=== `nack_reject_patterns`
218278

219-
A list of regular expression patterns whereby if a message that has failed to be delivered by Redpanda Connect has an error that matches it will be dropped (or delivered to a dead-letter queue if one exists). By default failed messages are nacked with requeue enabled.
279+
A list of regular expression patterns to match against errors in messages that Redpanda Connect fails to deliver. When a message has an error that matches a pattern, it is dropped or delivered to a dead-letter queue (if a queue has been configured).
220280

281+
By default, failed messages are negatively acknowledged (nacked) and requeued.
221282

222283
*Type*: `array`
223284

@@ -236,16 +297,15 @@ nack_reject_patterns:
236297

237298
=== `prefetch_count`
238299

239-
The maximum number of pending messages to have consumed at a time.
240-
300+
The maximum number of pending messages at a given time.
241301

242302
*Type*: `int`
243303

244304
*Default*: `10`
245305

246306
=== `prefetch_size`
247307

248-
The maximum amount of pending messages measured in bytes to have consumed at a time.
308+
The maximum size of pending messages (in bytes) at a given time.
249309

250310

251311
*Type*: `int`
@@ -254,12 +314,10 @@ The maximum amount of pending messages measured in bytes to have consumed at a t
254314

255315
=== `tls`
256316

257-
Custom TLS settings can be used to override system defaults.
258-
317+
Override system defaults with custom TLS settings.
259318

260319
*Type*: `object`
261320

262-
263321
=== `tls.enabled`
264322

265323
Whether custom TLS settings are enabled.
@@ -271,7 +329,7 @@ Whether custom TLS settings are enabled.
271329

272330
=== `tls.skip_cert_verify`
273331

274-
Whether to skip server side certificate verification.
332+
Whether to skip server-side certificate verification.
275333

276334

277335
*Type*: `bool`
@@ -293,7 +351,7 @@ endif::[]
293351

294352
=== `tls.root_cas`
295353

296-
An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
354+
Specify a certificate authority to use (optional). This is a string that represents a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate.
297355

298356
include::components:partial$secret_warning.adoc[]
299357

@@ -313,8 +371,7 @@ root_cas: |-
313371

314372
=== `tls.root_cas_file`
315373

316-
An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
317-
374+
Specify the path to a root certificate authority file (optional). This is a file, often with a `.pem` extension, that contains a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate.
318375

319376
*Type*: `string`
320377

@@ -328,7 +385,7 @@ root_cas_file: ./root_cas.pem
328385

329386
=== `tls.client_certs`
330387

331-
A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both.
388+
A list of client certificates to use. For each certificate, specify values for either the `cert` and `key` fields, or the `cert_file` and `key_file` fields.
332389

333390

334391
*Type*: `array`
@@ -389,12 +446,10 @@ The path of a certificate key to use.
389446

390447
A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete `pbeWithMD5AndDES-CBC` algorithm is not supported for the PKCS#8 format.
391448

392-
Because the obsolete pbeWithMD5AndDES-CBC algorithm does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.
449+
WARNING: The `pbeWithMD5AndDES-CBC` algorithm does not authenticate ciphertext, and is vulnerable to padding oracle attacks, which may allow an attacker to recover the plain text password.
393450

394451
include::components:partial$secret_warning.adoc[]
395452

396-
397-
398453
*Type*: `string`
399454

400455
*Default*: `""`

0 commit comments

Comments
 (0)