summaryrefslogtreecommitdiff
path: root/README.in
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-07-06 17:36:22 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-07-06 17:36:22 +0100
commit57263a7f999fe813de18405200e3d040bcc8429d (patch)
tree0b25c22845f8e72dcba0cd9f27a976f9fecf8f42 /README.in
parentcf7be59ceab4e6bcc617a274c44011183a67073a (diff)
downloadrabbitmq-server-git-57263a7f999fe813de18405200e3d040bcc8429d.tar.gz
make 'tx.commit-ok' indicate responsibility transfer
This is now very close to the previous tx semantics. The downsides w.r.t. the previous state of this branch are - a bit more code, though only in the channel - tx and confirm mode no longer compose - tx always carries the cost of confirms Implementation notes: - The channel must remain active while a commit waits for confirms from queues to trickle in. We achieve this by recording the fact that we have a pending commit. - The trigger for sending the commit-ok is that the number of pending confirms drops to zero and we have a pending commit. - We check for that condition in three places: a) at the point of commit (in case the tx contains no publishes or all confirmations happen as part of delivering the messages to queues) b) where we would normally send basic.acks c) where we would normally send basic.nacks - we are re-using the same logic/state as for 'proper' confirms, except we suppress the sending of acks/nacks - handling the failure case is slightly awkward. We record a tx as 'failed' as soon as we encounter the 'nack' case. Subsequently, when the aforementioned triggering condition is met instead of sending a tx.commit-ok we send a precondition_failed error. But we can't just employ rabbit_misc:protocol_error here since that only works in the context of handling an AMQP method, which is only the case for (a). So instead we drop to a slightly lower API level and rely on the fact precondition_failed is a channel-level, rather than connection-level error.
Diffstat (limited to 'README.in')
0 files changed, 0 insertions, 0 deletions