summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-11-06 13:08:48 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2010-11-06 13:08:48 +0000
commit3e7be49d9e125c23681da491924c4eab320b1269 (patch)
tree4cf40aede0c7b39aad990adb595b0946f757d291
parentf4afcfacaff0ca73ed6592ca79ff2421c5c92455 (diff)
parent37fecc4cf6c4fdd245188e448ccad6b448873fe6 (diff)
downloadrabbitmq-server-3e7be49d9e125c23681da491924c4eab320b1269.tar.gz
merge heads
-rw-r--r--src/rabbit_amqqueue.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 9d8d82e2..9d78bafa 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -36,6 +36,7 @@
maybe_run_queue_via_backing_queue/2,
update_ram_duration/1, set_ram_duration_target/2,
set_maximum_since_use/2, maybe_expire/1, drop_expired/1]).
+-export([pseudo_queue/2]).
-export([lookup/1, with/2, with_or_die/2, assert_equivalence/5,
check_exclusive_access/2, with_exclusive_access_or_die/3,
stat/1, deliver/2, requeue/3, ack/4, reject/4]).
@@ -161,6 +162,7 @@
-spec(set_maximum_since_use/2 :: (pid(), non_neg_integer()) -> 'ok').
-spec(maybe_expire/1 :: (pid()) -> 'ok').
-spec(on_node_down/1 :: (node()) -> 'ok').
+-spec(pseudo_queue/2 :: (binary(), pid()) -> rabbit_types:amqqueue()).
-endif.
@@ -495,6 +497,13 @@ delete_queue(QueueName) ->
ok = mnesia:delete({rabbit_queue, QueueName}),
rabbit_binding:remove_transient_for_destination(QueueName).
+pseudo_queue(QueueName, Pid) ->
+ #amqqueue{name = QueueName,
+ durable = false,
+ auto_delete = false,
+ arguments = [],
+ pid = Pid}.
+
safe_delegate_call_ok(F, Pids) ->
{_, Bad} = delegate:invoke(Pids,
fun (Pid) ->