diff options
| -rw-r--r-- | src/rabbit_exchange.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 459334455f..ce5af25d41 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -22,7 +22,7 @@ assert_equivalence/6, assert_args_equivalence/2, check_type/1, lookup/1, lookup_or_die/1, list/0, list/1, lookup_scratch/2, update_scratch/3, update_decorators/1, immutable/1, - info_keys/0, info/1, info/2, info_all/1, info_all/2, + info_keys/0, info/1, info/2, info_all/1, info_all/2, info_all/4, route/2, delete/2, validate_binding/2]). %% these must be run inside a mnesia tx -export([maybe_auto_delete/2, serial/1, peek_serial/1, update/2]). @@ -82,6 +82,9 @@ -spec(info_all/1 :: (rabbit_types:vhost()) -> [rabbit_types:infos()]). -spec(info_all/2 ::(rabbit_types:vhost(), rabbit_types:info_keys()) -> [rabbit_types:infos()]). +-spec(info_all/4 ::(rabbit_types:vhost(), rabbit_types:info_keys(), + reference(), pid()) + -> 'ok'). -spec(route/2 :: (rabbit_types:exchange(), rabbit_types:delivery()) -> [rabbit_amqqueue:name()]). -spec(delete/2 :: @@ -340,6 +343,11 @@ info_all(VHostPath) -> map(VHostPath, fun (X) -> info(X) end). info_all(VHostPath, Items) -> map(VHostPath, fun (X) -> info(X, Items) end). +info_all(VHostPath, Items, Ref, Pid) -> + map(VHostPath, fun (X) -> Pid ! {Ref, info(X, Items)} end), + Pid ! {Ref, finished}, + ok. + route(#exchange{name = #resource{virtual_host = VHost, name = RName} = XName, decorators = Decorators} = X, #delivery{message = #basic_message{routing_keys = RKs}} = Delivery) -> |
