From 398f072a03dc69af8808a048ca1a88a03e331f15 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Fri, 2 Dec 2022 17:06:17 +0100 Subject: [PATCH 1/2] Expose effective policy definition via CLI Now it's only visible in the management UI. One can craft a series of calls to `rabbitmqctl list_queues` and `rabbitmqctl list_policies` to achieve similiar result. But it's more difficult, and also doesn't take operator policy (if any) into account. --- deps/rabbit/docs/rabbitmqctl.8 | 6 +++++- .../lib/rabbitmq/cli/ctl/commands/list_queues_command.ex | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deps/rabbit/docs/rabbitmqctl.8 b/deps/rabbit/docs/rabbitmqctl.8 index a8d6578e5bc2..af8a9e32f8f3 100644 --- a/deps/rabbit/docs/rabbitmqctl.8 +++ b/deps/rabbit/docs/rabbitmqctl.8 @@ -1321,7 +1321,11 @@ Whether the queue will be deleted automatically when no longer used. .It Cm arguments Queue arguments. .It Cm policy -Effective policy name for the queue. +Name of the user policy that is applied to the queue. +.It Cm operator_policy +Name of the operator policy that is applied to the queue. +.It Cm effective_policy_definition +Effective policy definition for the queue - merged values from the user and operator policies. .It Cm pid Erlang process identifier of the queue. .It Cm owner_pid diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/list_queues_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/list_queues_command.ex index f2ae91472890..90a12a5e2c11 100644 --- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/list_queues_command.ex +++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/list_queues_command.ex @@ -15,7 +15,8 @@ defmodule RabbitMQ.CLI.Ctl.Commands.ListQueuesCommand do @default_timeout 60_000 @info_keys ~w(name durable auto_delete - arguments policy pid owner_pid exclusive exclusive_consumer_pid + arguments policy operator_policy effective_policy_definition + pid owner_pid exclusive exclusive_consumer_pid exclusive_consumer_tag messages_ready messages_unacknowledged messages messages_ready_ram messages_unacknowledged_ram messages_ram messages_persistent message_bytes message_bytes_ready From 93bac751697f54a6d9760da28c5341cc74bff526 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Sat, 3 Dec 2022 02:54:42 +0400 Subject: [PATCH 2/2] rabbitmqctl(8): wording --- deps/rabbit/docs/rabbitmqctl.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rabbit/docs/rabbitmqctl.8 b/deps/rabbit/docs/rabbitmqctl.8 index af8a9e32f8f3..933502b9a7b5 100644 --- a/deps/rabbit/docs/rabbitmqctl.8 +++ b/deps/rabbit/docs/rabbitmqctl.8 @@ -1325,7 +1325,7 @@ Name of the user policy that is applied to the queue. .It Cm operator_policy Name of the operator policy that is applied to the queue. .It Cm effective_policy_definition -Effective policy definition for the queue - merged values from the user and operator policies. +Effective policy definition for the queue: both user and operator policy definitions merged. .It Cm pid Erlang process identifier of the queue. .It Cm owner_pid