diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2015-03-13 16:46:17 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2015-03-13 16:46:17 +0000 |
| commit | 397e5a1f1dd8134e559bde969d6bb09f8a2418ee (patch) | |
| tree | a1b02575b95a17afe1d28067e028bd1902b0d5ac | |
| parent | 73f2188d5c2d3b84fc9ffb1a05d4b5bfc82e7b5d (diff) | |
| parent | 2699e48167d852af5c4eb8cbb49381ba6e49748f (diff) | |
| download | rabbitmq-server-git-397e5a1f1dd8134e559bde969d6bb09f8a2418ee.tar.gz | |
Merge branch 'rabbitmq-server-65' into stable
| -rw-r--r-- | src/rabbit_priority_queue.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit_priority_queue.erl b/src/rabbit_priority_queue.erl index 30e7c051fe..e20e4b4c14 100644 --- a/src/rabbit_priority_queue.erl +++ b/src/rabbit_priority_queue.erl @@ -533,9 +533,12 @@ a(State = #state{bqss = BQSs}) -> priority(P, BQSs) when is_integer(P) -> {P, bq_fetch(P, BQSs)}; -priority(_Msg, [{P, BQSN}]) -> +priority(#basic_message{content = Content}, BQSs) -> + priority1(rabbit_binary_parser:ensure_content_decoded(Content), BQSs). + +priority1(_Content, [{P, BQSN}]) -> {P, BQSN}; -priority(Msg = #basic_message{content = #content{properties = Props}}, +priority1(Content = #content{properties = Props}, [{P, BQSN} | Rest]) -> #'P_basic'{priority = Priority0} = Props, Priority = case Priority0 of @@ -544,7 +547,7 @@ priority(Msg = #basic_message{content = #content{properties = Props}}, end, case Priority >= P of true -> {P, BQSN}; - false -> priority(Msg, Rest) + false -> priority1(Content, Rest) end. add_maybe_infinity(infinity, _) -> infinity; |
