Skip to content

Commit 1b7b783

Browse files
committed
don't tell users to employ tx for responsibility transfer
since in bug 24216 that doesn't happen
1 parent 682ee05 commit 1b7b783

File tree

1 file changed

+6
-43
lines changed

1 file changed

+6
-43
lines changed

docs/wikipages/data.MessagingPatterns.txt

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -487,32 +487,7 @@ two AMQP clients involved: the publisher, and the consumer.
487487

488488
Responsibility can be partially transferred to the broker by using
489489
durable queues, durable exchanges, persistent-mode delivered messages
490-
(with [code DeliveryMode] set equal to 2), and [code Tx]-class
491-
transactions or Publisher Confirms.
492-
493-
To transfer responsibility for delivery of a message to a broker using
494-
[code Tx]
495-
496-
- ensure (ahead of time) that the target queue exists and is durable,
497-
498-
- select [code Tx] mode using [code IModel.TxSelect],
499-
500-
- publish the message with the "mandatory" flag set and [code
501-
DeliveryMode] set equal to 2, and
502-
503-
- commit the [code Tx] transaction using [code IModel.TxCommit].
504-
505-
Once a broker replies with [code CommitOk] (i.e. the [code TxCommit()]
506-
call returns to the caller), it has taken responsibility for keeping
507-
the message on disk and on the target queue until some other
508-
application retrieves and acknowledges the message.
509-
510-
A commit is not required after every message: batching of publications
511-
may be done, depending on the precise delivery guarantees the
512-
publishing application requires.
513-
514-
To transfer responsibility for delivery of a message to a broker using
515-
Publisher Confirms
490+
(with [code DeliveryMode] set equal to 2), and Publisher Confirms:
516491

517492
- ensure (ahead of time) that the target queue is durable,
518493

@@ -579,19 +554,11 @@ To implement at-least-once delivery:
579554

580555
To reduce the need for resends of a message when publishing using an
581556
at-least-once QoS level, it can sometimes be appropriate to use [code
582-
Tx]-class transactions, as described above in the section on
583-
responsibility transfer. Of course, if the [code CommitOk] message
584-
from the server is lost, then a resend will have to be done, since the
585-
sending client doesn't know whether the server actually saw the
586-
message or not unless the [code CommitOk] arrives.
587-
588-
Once of the important failure-modes when using at-least-once mode in
589-
conjunction with [code Tx]-class transactions is the loss of atomicity
590-
that can arise when a completed transaction is published to the
591-
broker, but the whole transaction is only partially received on the
592-
consuming side before some kind of failure occurs. In these
593-
situations, there will be partial duplication of a transaction: some
594-
of the messages in the transaction will be delivered more than once.
557+
Confirm]-class, as described above in the section on responsibility
558+
transfer. Of course, if a confirmation from the broker is lost, then a
559+
resend will have to be done, since the sending client doesn't know
560+
whether the server actually saw the message or not unless the
561+
[Basic.Nack] arrives.
595562

596563
Alternatively, rather than implement the round-trip logic manually, a
597564
client may use Publisher Confirms. By enabling Confirm mode on a
@@ -760,7 +727,3 @@ step. For example:
760727
server. In cases where there is no reply to a request, the
761728
acknowledgement is still useful to ensure that requests are not
762729
lost.
763-
764-
- Finally, if [code Tx]-class transactions are in use, the work cycle
765-
can be closed off by invoking [code IModel.TxCommit], and the next
766-
request can be tackled.

0 commit comments

Comments
 (0)