|
2570 | 2570 |
|
2571 | 2571 | <method name = "ack" index = "80" label = "acknowledge one or more messages">
|
2572 | 2572 | <doc>
|
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. |
| 2573 | + When sent by the client, this method acknowledges one or more |
| 2574 | + messages delivered via the Deliver or Get-Ok methods. |
| 2575 | + |
| 2576 | + When sent by server, this method acknowledges one or more |
| 2577 | + messages published with the Publish method on a channel in |
| 2578 | + confirm mode. |
2577 | 2579 |
|
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. |
| 2580 | + The acknowledgement can be for a single message or a set of |
| 2581 | + messages up to and including a specific message. |
2582 | 2582 | </doc>
|
2583 | 2583 |
|
2584 | 2584 | <chassis name = "server" implement = "MUST" />
|
2585 |
| - <chassis name="client" implement="MUST"/> |
| 2585 | + <chassis name ="client" implement = "MUST"/> |
2586 | 2586 |
|
2587 | 2587 | <field name = "delivery-tag" domain = "delivery-tag" />
|
2588 | 2588 | <field name = "multiple" domain = "bit" label = "acknowledge multiple messages">
|
2589 | 2589 | <doc>
|
2590 |
| - If set to 1, the delivery tag is treated as "up to and including", so that the |
2591 |
| - peer can acknowledge multiple messages with a single method. If set to zero, |
2592 |
| - the delivery tag refers to a single message. If the multiple field is 1, and the |
2593 |
| - delivery tag is zero, tells the server to acknowledge all outstanding messages. |
| 2590 | + If set to 1, the delivery tag is treated as "up to and |
| 2591 | + including", so that multiple messages can be acknowledged |
| 2592 | + with a single method. If set to zero, the delivery tag |
| 2593 | + refers to a single message. If the multiple field is 1, and |
| 2594 | + the delivery tag is zero, this indicates acknowledgement of |
| 2595 | + all outstanding messages. |
2594 | 2596 | </doc>
|
2595 | 2597 | <rule name = "exists" on-failure = "precondition-failed">
|
2596 | 2598 | <doc>
|
2597 |
| - The server MUST validate that a non-zero delivery-tag refers to a delivered |
2598 |
| - message, and raise a channel exception if this is not the case. On a transacted |
2599 |
| - channel, this check MUST be done immediately and not delayed until a Tx.Commit. |
2600 |
| - Specifically, a client MUST not acknowledge the same message more than once. |
| 2599 | + A message MUST not be acknowledged more than once. The |
| 2600 | + receiving peer MUST validate that a non-zero delivery-tag |
| 2601 | + refers to a delivered message, and raise a channel |
| 2602 | + exception if this is not the case. On a transacted |
| 2603 | + channel, this check MUST be done immediately and not |
| 2604 | + delayed until a Tx.Commit. |
2601 | 2605 | </doc>
|
2602 | 2606 | <doc type = "scenario">
|
2603 | 2607 | TODO.
|
|
2858 | 2862 | <class name = "confirm" handler = "channel" index = "85" label = "work with confirms">
|
2859 | 2863 | <doc>
|
2860 | 2864 | 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. |
| 2865 | + confirm mode and susequently be notified when messages have been |
| 2866 | + handled by the broker. The intention is that all messages |
| 2867 | + published on a channel in confirm mode will be acknowledged at |
| 2868 | + some point. By acknowledging a message the broker assumes |
| 2869 | + responsibility for it and indicates that it has done something |
| 2870 | + it deems reasonable with it. |
2867 | 2871 |
|
2868 | 2872 | 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 |
| 2873 | + right after the Basic.Return method. Messages are acknowledged |
| 2874 | + when all queues to which the message has been routed |
2872 | 2875 | have either delivered the message and received an
|
2873 |
| - acknowledgement (if required), or persisted the message. |
| 2876 | + acknowledgement (if required), or enqueued the message (and |
| 2877 | + persisted it if required). |
2874 | 2878 |
|
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 | + Published messages are assigned ascending sequence numbers, |
| 2880 | + starting at 0 when the Confirm.Select method is used. The server |
| 2881 | + confirms messages by sending Basic.Ack methods referring to these |
| 2882 | + sequence numbers. |
2879 | 2883 | </doc>
|
2880 | 2884 |
|
2881 | 2885 | <rule name = "all messages acknowledged">
|
|
2885 | 2889 | </doc>
|
2886 | 2890 | </rule>
|
2887 | 2891 |
|
2888 |
| - <rule name = "wait for all queues"> |
| 2892 | + <rule name = "all queues"> |
2889 | 2893 | <doc>
|
2890 | 2894 | The server MUST acknowledge a message only after it was
|
2891 | 2895 | properly handled by all the queues it was delivered to.
|
|
2899 | 2903 | </doc>
|
2900 | 2904 | </rule>
|
2901 | 2905 |
|
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 | 2906 | <rule name = "time guarantees">
|
2911 | 2907 | <doc>
|
2912 | 2908 | No guarantees are made as to how soon a message is
|
|
2917 | 2913 |
|
2918 | 2914 | <doc type = "grammar">
|
2919 | 2915 | confirm = C:SELECT S:SELECT-OK
|
2920 |
| - / S:ACK |
2921 | 2916 | </doc>
|
2922 | 2917 |
|
2923 | 2918 | <chassis name = "server" implement = "SHOULD" />
|
|
0 commit comments