Skip to content

Commit 7145f26

Browse files
author
Alexandru Scvortov
committed
extend confirm-mode docs
1 parent 4f1cceb commit 7145f26

File tree

1 file changed

+81
-5
lines changed

1 file changed

+81
-5
lines changed

docs/specs/amqp0-9-1.xml

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,9 +2570,15 @@
25702570

25712571
<method name = "ack" index = "80" label = "acknowledge one or more messages">
25722572
<doc>
2573-
This method acknowledges one or more messages delivered via the Deliver or Get-Ok
2574-
methods. The client can ask to confirm a single message or a set of messages up to
2575-
and including a specific message.
2573+
On the server side, this method acknowledges one or more
2574+
messages delivered via the Deliver or Get-Ok methods; the
2575+
client can ask to confirm a single message or a set of
2576+
messages up to and including a specific message.
2577+
2578+
On the client side, this method acknowledges one or more
2579+
messages published to a channel in confirm mode; the client
2580+
may receive an acknowledgement for a single message or for a
2581+
set of message up to and including a specific message.
25762582
</doc>
25772583

25782584
<chassis name = "server" implement = "MUST" />
@@ -2582,7 +2588,7 @@
25822588
<field name = "multiple" domain = "bit" label = "acknowledge multiple messages">
25832589
<doc>
25842590
If set to 1, the delivery tag is treated as "up to and including", so that the
2585-
client can acknowledge multiple messages with a single method. If set to zero,
2591+
peer can acknowledge multiple messages with a single method. If set to zero,
25862592
the delivery tag refers to a single message. If the multiple field is 1, and the
25872593
delivery tag is zero, tells the server to acknowledge all outstanding messages.
25882594
</doc>
@@ -2849,7 +2855,76 @@
28492855

28502856
<!-- == CONFIRM ========================================================== -->
28512857

2852-
<class name="confirm" handler="channel" index="85">
2858+
<class name = "confirm" handler = "channel" index = "85" label = "work with confirms">
2859+
<doc>
2860+
The Confirm class allows publishers to put the channel in
2861+
confirm mode and be notified when messages have been handled by
2862+
the broker. The intention is that all messages published on a
2863+
channel in confirm mode will be acknowledged at some point. By
2864+
acknowledging a message the broker assumes responsibility for it
2865+
and indicates that it has done something it deems reasonable
2866+
with it.
2867+
2868+
Unroutable mandatory or immediate messages are acknowledged
2869+
right after the Basic.Return method. Transient messages are
2870+
acknowledged as soon as they arrive on all the queues they were
2871+
routed to. Persistent messages are acknowledged when all queues
2872+
have either delivered the message and received an
2873+
acknowledgement (if required), or persisted the message.
2874+
2875+
Published messages are assigned ascending sequence numbers
2876+
(starting at 0, when the Confirm.Select method is used); these
2877+
sequence numbers are later used to identify messages in
2878+
Basic.Ack methods.
2879+
</doc>
2880+
2881+
<rule name = "all messages acknowledged">
2882+
<doc>
2883+
The server MUST acknowledge all messages received after the
2884+
channel was put into confirm mode.
2885+
</doc>
2886+
</rule>
2887+
2888+
<rule name = "wait for all queues">
2889+
<doc>
2890+
The server MUST acknowledge a message only after it was
2891+
properly handled by all the queues it was delivered to.
2892+
</doc>
2893+
</rule>
2894+
2895+
<rule name = "unroutable messages">
2896+
<doc>
2897+
The server MUST acknowledge an unroutable mandatory or
2898+
immediate message only after it sends the Basic.Return.
2899+
</doc>
2900+
</rule>
2901+
2902+
<rule name = "forget confirmed messages">
2903+
<doc>
2904+
The server MUST NOT reference any messages it has already
2905+
confirmed. Thus, clients can safely forget about confirmed
2906+
messages.
2907+
</doc>
2908+
</rule>
2909+
2910+
<rule name = "time guarantees">
2911+
<doc>
2912+
No guarantees are made as to how soon a message is
2913+
acknowledged. Applications SHOULD NOT make assumptions about
2914+
this.
2915+
</doc>
2916+
</rule>
2917+
2918+
<doc type = "grammar">
2919+
confirm = C:SELECT S:SELECT-OK
2920+
/ S:ACK
2921+
</doc>
2922+
2923+
<chassis name = "server" implement = "SHOULD" />
2924+
<chassis name = "client" implement = "MAY" />
2925+
2926+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
2927+
28532928
<method name="select" synchronous="1" index="10">
28542929
select confirm mode (i.e. enable publisher acknowledgements)
28552930
<doc>
@@ -2868,6 +2943,7 @@
28682943
</doc>
28692944
</field>
28702945
</method>
2946+
28712947
<method name="select-ok" synchronous="1" index="11">
28722948
acknowledge confirm mode
28732949
<doc>

0 commit comments

Comments
 (0)