Skip to content

Commit 4fad6ec

Browse files
Shovel: revisit ack-mode documentation
References #2013.
1 parent 2611795 commit 4fad6ec

File tree

4 files changed

+68
-50
lines changed

4 files changed

+68
-50
lines changed

docs/shovel-dynamic.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Here is how the plugin can be configured to wait until the source is available [
206206

207207
```ini
208208
# all shovels started on this node will use pre-declared topology
209-
shovel.topology.predeclared = true
209+
shovel.topology.predeclared = true
210210
```
211211

212212
If only some shovels need to use a pre-declared topology, the same behavior can be configured
@@ -446,22 +446,25 @@ the declaration process.
446446
<td>ack-mode</td>
447447
<td>
448448
<p>
449-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
449+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
450+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
451+
<code>on-confirm</code> is used by default.
452+
</p>
453+
<p>
450454
If set to <code>on-confirm</code> (the default), messages are
451-
acknowledged to the source broker after they have been confirmed
455+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
452456
by the destination. This handles network errors and broker
453457
failures without losing messages, and is the slowest option.
454458
</p>
455459
<p>
456-
If set to <code>on-publish</code>, messages are acknowledged to
460+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
457461
the source broker after they have been published at the
458-
destination. This handles network errors without losing messages,
462+
destination (but not yet confirmed). This handles network errors without losing messages,
459463
but may lose messages in the event of broker failures.
460464
</p>
461465
<p>
462-
If set to <code>no-ack</code>, message acknowledgements are not
463-
used. This is the fastest option, but may lose messages in the
464-
event of network or broker failures.
466+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
467+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
465468
</p>
466469
</td>
467470
</tr>
@@ -687,22 +690,25 @@ counterparts.
687690
<td>ack-mode</td>
688691
<td>
689692
<p>
690-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
693+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
694+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
695+
<code>on-confirm</code> is used by default.
696+
</p>
697+
<p>
691698
If set to <code>on-confirm</code> (the default), messages are
692-
acknowledged to the source broker after they have been confirmed
699+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
693700
by the destination. This handles network errors and broker
694701
failures without losing messages, and is the slowest option.
695702
</p>
696703
<p>
697-
If set to <code>on-publish</code>, messages are acknowledged to
704+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
698705
the source broker after they have been published at the
699-
destination. This handles network errors without losing messages,
706+
destination (but not yet confirmed). This handles network errors without losing messages,
700707
but may lose messages in the event of broker failures.
701708
</p>
702709
<p>
703-
If set to <code>no-ack</code>, message acknowledgements are not
704-
used. This is the fastest option, but may lose messages in the
705-
event of network or broker failures.
710+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
711+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
706712
</p>
707713
</td>
708714
</tr>

docs/shovel-static.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Some keys are supported by both AMQP 0-9-1 and AMQP 1.0 sources.
125125
They are described in the table below.
126126

127127
<table>
128-
<caption>General Static Shovel Keys (Properties)</caption>
128+
<caption>Common (Protocol-Independent) Static Shovel Keys (Properties)</caption>
129129

130130
<thead>
131131
<tr>
@@ -153,22 +153,25 @@ They are described in the table below.
153153
<td>ack-mode</td>
154154
<td>
155155
<p>
156-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
156+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
157+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
158+
<code>on-confirm</code> is used by default.
159+
</p>
160+
<p>
157161
If set to <code>on-confirm</code> (the default), messages are
158-
acknowledged to the source broker after they have been confirmed
162+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
159163
by the destination. This handles network errors and broker
160164
failures without losing messages, and is the slowest option.
161165
</p>
162166
<p>
163-
If set to <code>on-publish</code>, messages are acknowledged to
167+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
164168
the source broker after they have been published at the
165-
destination. This handles network errors without losing messages,
169+
destination (but not yet confirmed). This handles network errors without losing messages,
166170
but may lose messages in the event of broker failures.
167171
</p>
168172
<p>
169-
If set to <code>no-ack</code>, message acknowledgements are not
170-
used. This is the fastest option, but may lose messages in the
171-
event of network or broker failures.
173+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
174+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
172175
</p>
173176
</td>
174177
</tr>
@@ -196,7 +199,7 @@ AMQP 0-9-1-specific source keys are covered in a separate table:
196199
<p>
197200
An optional list of AMQP 0-9-1 operations to be executed by the Shovel
198201
before it starts transferring messages. They are typically used to set
199-
up the topology.
202+
up the topology.
200203
</p>
201204
```erlang
202205
{declarations, [
@@ -299,14 +302,14 @@ AMQP 0-9-1-specific source keys are covered in a separate table:
299302

300303
#### Predeclared topology {#predeclared-topology}
301304

302-
The `declarations` attribute is typically used to set up the topology. At the very least, it must set up the source queue.
305+
The `declarations` attribute is typically used to set up the topology. At the very least, it must set up the source queue.
303306

304-
There are deployment scenarios where the topology is automatically [imported from a definitions file at boot time](./definitions#import-on-boot). In these scenarios, we can configure the plugin to wait until the queue is available by adding the following line to the `rabbitmq.conf` file:
307+
There are deployment scenarios where the topology is automatically [imported from a definitions file at boot time](./definitions#import-on-boot). In these scenarios, we can configure the plugin to wait until the queue is available by adding the following line to the `rabbitmq.conf` file:
305308
```ini
306-
shovel.topology.predeclared = true
309+
shovel.topology.predeclared = true
307310
```
308311

309-
With the above configuration, if a static shovel has no `declarations` attribute or it is empty, the piugin will wait until the source's `queue` is eventually declared.
312+
With the above configuration, if a static shovel has no `declarations` attribute or it is empty, the piugin will wait until the source's `queue` is eventually declared.
310313

311314
### AMQP 1.0 Source Keys
312315

versioned_docs/version-3.13/shovel-dynamic.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -391,22 +391,25 @@ the declaration process.
391391
<td>ack-mode</td>
392392
<td>
393393
<p>
394-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
394+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
395+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
396+
<code>on-confirm</code> is used by default.
397+
</p>
398+
<p>
395399
If set to <code>on-confirm</code> (the default), messages are
396-
acknowledged to the source broker after they have been confirmed
400+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
397401
by the destination. This handles network errors and broker
398402
failures without losing messages, and is the slowest option.
399403
</p>
400404
<p>
401-
If set to <code>on-publish</code>, messages are acknowledged to
405+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
402406
the source broker after they have been published at the
403-
destination. This handles network errors without losing messages,
407+
destination (but not yet confirmed). This handles network errors without losing messages,
404408
but may lose messages in the event of broker failures.
405409
</p>
406410
<p>
407-
If set to <code>no-ack</code>, message acknowledgements are not
408-
used. This is the fastest option, but may lose messages in the
409-
event of network or broker failures.
411+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
412+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
410413
</p>
411414
</td>
412415
</tr>
@@ -632,22 +635,25 @@ counterparts.
632635
<td>ack-mode</td>
633636
<td>
634637
<p>
635-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
638+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
639+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
640+
<code>on-confirm</code> is used by default.
641+
</p>
642+
<p>
636643
If set to <code>on-confirm</code> (the default), messages are
637-
acknowledged to the source broker after they have been confirmed
644+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
638645
by the destination. This handles network errors and broker
639646
failures without losing messages, and is the slowest option.
640647
</p>
641648
<p>
642-
If set to <code>on-publish</code>, messages are acknowledged to
649+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
643650
the source broker after they have been published at the
644-
destination. This handles network errors without losing messages,
651+
destination (but not yet confirmed). This handles network errors without losing messages,
645652
but may lose messages in the event of broker failures.
646653
</p>
647654
<p>
648-
If set to <code>no-ack</code>, message acknowledgements are not
649-
used. This is the fastest option, but may lose messages in the
650-
event of network or broker failures.
655+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
656+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
651657
</p>
652658
</td>
653659
</tr>

versioned_docs/version-3.13/shovel-static.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Some keys are supported by both AMQP 0-9-1 and AMQP 1.0 sources.
125125
They are described in the table below.
126126

127127
<table>
128-
<caption>General Static Shovel Keys (Properties)</caption>
128+
<caption>Common (Protocol-Independent) Static Shovel Keys (Properties)</caption>
129129

130130
<thead>
131131
<tr>
@@ -153,22 +153,25 @@ They are described in the table below.
153153
<td>ack-mode</td>
154154
<td>
155155
<p>
156-
Determines how the shovel should <a href="./confirms">acknowledge</a> consumed messages.
156+
Determines how the shovel should <a href="./confirms/">acknowledge</a> consumed messages.
157+
Valid values are <code>on-confirm</code>, <code>on-publish</code>, and <code>no-ack</code>.
158+
<code>on-confirm</code> is used by default.
159+
</p>
160+
<p>
157161
If set to <code>on-confirm</code> (the default), messages are
158-
acknowledged to the source broker after they have been confirmed
162+
<a href="./confirms/">acknowledged</a> to the source broker after they have been confirmed
159163
by the destination. This handles network errors and broker
160164
failures without losing messages, and is the slowest option.
161165
</p>
162166
<p>
163-
If set to <code>on-publish</code>, messages are acknowledged to
167+
If set to <code>on-publish</code>, messages are <a href="./confirms/">acknowledged</a> to
164168
the source broker after they have been published at the
165-
destination. This handles network errors without losing messages,
169+
destination (but not yet confirmed). This handles network errors without losing messages,
166170
but may lose messages in the event of broker failures.
167171
</p>
168172
<p>
169-
If set to <code>no-ack</code>, message acknowledgements are not
170-
used. This is the fastest option, but may lose messages in the
171-
event of network or broker failures.
173+
If set to <code>no-ack</code>, <a href="./confirms/">automatic message acknowledgements</a> will be used.
174+
This option will offer the highest throughput but is not safe (will lose messages in the event of network or broker failures).
172175
</p>
173176
</td>
174177
</tr>

0 commit comments

Comments
 (0)