summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue_process.erl4
-rw-r--r--src/rabbit_priority_queue.erl18
2 files changed, 2 insertions, 20 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 746679168f..a3c8f99519 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -382,7 +382,6 @@ process_args_policy(State = #q{q = Q,
{<<"message-ttl">>, fun res_min/2, fun init_ttl/2},
{<<"max-length">>, fun res_min/2, fun init_max_length/2},
{<<"max-length-bytes">>, fun res_min/2, fun init_max_bytes/2},
- {<<"max-priority">>, fun res_arg/2, fun init_max_priority/2},
{<<"overflow">>, fun res_arg/2, fun init_overflow/2},
{<<"queue-mode">>, fun res_arg/2, fun init_queue_mode/2}],
drop_expired_msgs(
@@ -427,9 +426,6 @@ init_max_bytes(MaxBytes, State) ->
{_Dropped, State1} = maybe_drop_head(State#q{max_bytes = MaxBytes}),
State1.
-init_max_priority(_MaxPriority, State) ->
- State.
-
init_overflow(undefined, State) ->
State;
init_overflow(Overflow, State) ->
diff --git a/src/rabbit_priority_queue.erl b/src/rabbit_priority_queue.erl
index 481fd9a390..b1eb83dddc 100644
--- a/src/rabbit_priority_queue.erl
+++ b/src/rabbit_priority_queue.erl
@@ -28,8 +28,6 @@
{requires, pre_boot},
{enables, kernel_ready}]}).
--import(rabbit_misc, [pget/2]).
-
-export([enable/0]).
-export([start/2, stop/1]).
@@ -45,8 +43,6 @@
info/2, invoke/3, is_duplicate/2, set_queue_mode/2,
zip_msgs_and_acks/4, handle_info/2]).
--export([max_priority/1, priorities/1]).
-
-record(state, {bq, bqss, max_priority}).
-record(passthrough, {bq, bqs}).
@@ -129,19 +125,9 @@ collapse_recovery(QNames, DupNames, Recovery) ->
end, dict:new(), lists:zip(DupNames, Recovery)),
[dict:fetch(Name, NameToTerms) || Name <- QNames].
-max_priority(Q = #amqqueue{arguments = Args}) ->
- case rabbit_misc:table_lookup(Args, <<"x-max-priority">>) of
- {Type, RequestedMax} -> {Type, RequestedMax};
- undefined ->
- case rabbit_policy:effective_definition(Q) of
- undefined -> undefined;
- Proplist -> {unsignedbyte, pget(<<"max-priority">>, Proplist)}
- end
- end.
-
-priorities(Q) ->
+priorities(#amqqueue{arguments = Args}) ->
Ints = [long, short, signedint, byte, unsignedbyte, unsignedshort, unsignedint],
- case max_priority(Q) of
+ case rabbit_misc:table_lookup(Args, <<"x-max-priority">>) of
{Type, RequestedMax} ->
case lists:member(Type, Ints) of
false -> none;