summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2009-06-05 08:10:51 +0100
committerMatthias Radestock <matthias@lshift.net>2009-06-05 08:10:51 +0100
commit1b43c217f415bc0cdd976229a2abcb18a8374c62 (patch)
tree8c4e12ad24bfa610bbe096d3ae09a838972aee67 /include
parenteb638c17b4ef2c97ae37962e633584d269700d3d (diff)
downloadrabbitmq-server-git-1b43c217f415bc0cdd976229a2abcb18a8374c62.tar.gz
clean up tx records in queues when a transaction's channel dies
Previously queues were only monitoring channels with subscribers or to which ack-requiring messages had been delivered. Now queues also monitor channels from which they have received transactional publishes. Queues record the last tx id they have seen from a channel. This then makes it easy and efficient to find the associated tx record in the queue's process dictionary when a channel process dies - the alternative would be to scan the tx records for matching channel pids - and perform the required rollback activities for the tx.
Diffstat (limited to 'include')
-rw-r--r--include/rabbit.hrl3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl
index 5ebc82a2be..784c21b39d 100644
--- a/include/rabbit.hrl
+++ b/include/rabbit.hrl
@@ -64,7 +64,7 @@
-record(basic_message, {exchange_name, routing_key, content, persistent_key}).
--record(delivery, {mandatory, immediate, txn, message}).
+-record(delivery, {mandatory, immediate, txn, sender, message}).
%%----------------------------------------------------------------------------
@@ -140,6 +140,7 @@
#delivery{mandatory :: bool(),
immediate :: bool(),
txn :: maybe(txn()),
+ sender :: pid(),
message :: message()}).
%% this really should be an abstract type
-type(msg_id() :: non_neg_integer()).