Skip to content

Commit 1e909f8

Browse files
committed
issue #14: fix crash when creating deduplicating and priority queue
The priority queue behaviour implementation makes assumptions on the format of the returned information. Therefore, appending additional information to the returned one will cause priority queues to crash. This patch prevents returning the cache status when priority queues are enabled. Signed-off-by: Matteo Cafasso <[email protected]>
1 parent dbf8a1b commit 1e909f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rabbit_message_deduplication_queue.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,11 @@ defmodule RabbitMQ.MessageDeduplicationPlugin.Queue do
329329
end
330330

331331
def info(:backing_queue_status, dqstate(queue: queue, queue_state: qs)) do
332+
amqqueue(arguments: args) = queue
332333
queue_info = passthrough do: info(:backing_queue_status, qs)
334+
priority = Common.rabbit_argument(args, "x-max-priority", default: false)
333335

334-
if duplicate?(queue) do
336+
if duplicate?(queue) and !priority do
335337
[message_deduplication_cache_info: cache_info(queue)] ++ queue_info
336338
else
337339
queue_info

0 commit comments

Comments
 (0)