diff options
author | Matthias Radestock <matthias@lshift.net> | 2010-02-04 19:12:17 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2010-02-04 19:12:17 +0000 |
commit | 32817e4d7aadd46e205869ecc3bd4d22ca293b3c (patch) | |
tree | fe652367b44df90baa544ed4bc307840b7dba832 | |
parent | 41a0a4ffa30e66a873e1a97c5108069391d8d662 (diff) | |
download | rabbitmq-server-32817e4d7aadd46e205869ecc3bd4d22ca293b3c.tar.gz |
ditch API for channel-based consumer listing
-rw-r--r-- | src/rabbit_channel.erl | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 0dbcf115..d0b0ee91 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -37,8 +37,7 @@ -export([start_link/5, do/2, do/3, shutdown/1]). -export([send_command/2, deliver/4, conserve_memory/2]). --export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1, - consumers/1, consumers_all/0]). +-export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1]). -export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2, handle_info/2, handle_pre_hibernate/1]). @@ -83,8 +82,6 @@ -spec(info/2 :: (pid(), [info_key()]) -> [info()]). -spec(info_all/0 :: () -> [[info()]]). -spec(info_all/1 :: ([info_key()]) -> [[info()]]). --spec(consumers/1 :: (pid()) -> [{binary(), queue_name()}]). --spec(consumers_all/0 :: () -> [{pid(), binary(), queue_name()}]). -endif. @@ -134,16 +131,6 @@ info_all() -> info_all(Items) -> rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list()). -consumers(Pid) -> - gen_server2:pcall(Pid, 9, consumers, infinity). - -consumers_all() -> - lists:concat( - rabbit_misc:filter_exit_map( - fun (C) -> - [{C, Tag, QueueName} || {Tag, QueueName} <- consumers(C)] - end, list())). - %%--------------------------------------------------------------------------- init([Channel, ReaderPid, WriterPid, Username, VHost]) -> @@ -177,10 +164,6 @@ handle_call({info, Items}, _From, State) -> catch Error -> reply({error, Error}, State) end; -handle_call(consumers, _From, - State = #ch{consumer_mapping = ConsumerMapping}) -> - reply(dict:to_list(ConsumerMapping), State); - handle_call(_Request, _From, State) -> noreply(State). |