diff --git a/deps/rabbit/src/rabbit_fifo.erl b/deps/rabbit/src/rabbit_fifo.erl
index 04c11c2db587..0289bf9418f1 100644
--- a/deps/rabbit/src/rabbit_fifo.erl
+++ b/deps/rabbit/src/rabbit_fifo.erl
@@ -850,10 +850,9 @@ overview(#?STATE{consumers = Cons,
#{}
end,
MsgsRet = lqueue:len(Returns),
-
- #{len := _MsgsLen,
- num_hi := MsgsHi,
+ #{num_hi := MsgsHi,
num_lo := MsgsLo} = rabbit_fifo_q:overview(Messages),
+
Overview = #{type => ?STATE,
config => Conf,
num_consumers => map_size(Cons),
diff --git a/deps/rabbit/src/rabbit_quorum_queue.erl b/deps/rabbit/src/rabbit_quorum_queue.erl
index fd91cde0e8c8..9f5d66faed6f 100644
--- a/deps/rabbit/src/rabbit_quorum_queue.erl
+++ b/deps/rabbit/src/rabbit_quorum_queue.erl
@@ -103,6 +103,8 @@
-define(RA_SYSTEM, quorum_queues).
-define(RA_WAL_NAME, ra_log_wal).
+-define(DEFAULT_DELIVERY_LIMIT, 20).
+
-define(INFO(Str, Args),
rabbit_log:info("[~s:~s/~b] " Str,
[?MODULE, ?FUNCTION_NAME, ?FUNCTION_ARITY | Args])).
@@ -320,7 +322,14 @@ ra_machine_config(Q) when ?is_amqqueue(Q) ->
OverflowBin = args_policy_lookup(<<"overflow">>, fun policyHasPrecedence/2, Q),
Overflow = overflow(OverflowBin, drop_head, QName),
MaxBytes = args_policy_lookup(<<"max-length-bytes">>, fun min/2, Q),
- DeliveryLimit = args_policy_lookup(<<"delivery-limit">>, fun min/2, Q),
+ DeliveryLimit = case args_policy_lookup(<<"delivery-limit">>, fun min/2, Q) of
+ undefined ->
+ rabbit_log:info("~ts: delivery_limit not set, defaulting to ~b",
+ [rabbit_misc:rs(QName), ?DEFAULT_DELIVERY_LIMIT]),
+ ?DEFAULT_DELIVERY_LIMIT;
+ DL ->
+ DL
+ end,
Expires = args_policy_lookup(<<"expires">>, fun min/2, Q),
MsgTTL = args_policy_lookup(<<"message-ttl">>, fun min/2, Q),
#{name => Name,
@@ -508,11 +517,12 @@ spawn_notify_decorators(QName, Fun, Args) ->
catch notify_decorators(QName, Fun, Args).
handle_tick(QName,
- #{config := #{name := Name},
+ #{config := #{name := Name} = Cfg,
num_active_consumers := NumConsumers,
num_checked_out := NumCheckedOut,
num_ready_messages := NumReadyMsgs,
num_messages := NumMessages,
+ num_enqueuers := NumEnqueuers,
enqueue_message_bytes := EnqueueBytes,
checkout_message_bytes := CheckoutBytes,
num_discarded := NumDiscarded,
@@ -559,6 +569,7 @@ handle_tick(QName,
MsgBytesDiscarded = DiscardBytes + DiscardCheckoutBytes,
MsgBytes = EnqueueBytes + CheckoutBytes + MsgBytesDiscarded,
Infos = [{consumers, NumConsumers},
+ {publishers, NumEnqueuers},
{consumer_capacity, Util},
{consumer_utilisation, Util},
{messages, NumMessages},
@@ -573,7 +584,14 @@ handle_tick(QName,
{message_bytes_dlx, MsgBytesDiscarded},
{single_active_consumer_tag, SacTag},
{single_active_consumer_pid, SacPid},
- {leader, node()}
+ {leader, node()},
+ {delivery_limit, case maps:get(delivery_limit, Cfg,
+ undefined) of
+ undefined ->
+ unlimited;
+ Limit ->
+ Limit
+ end}
| Infos0],
rabbit_core_metrics:queue_stats(QName, Infos),
ok = repair_leader_record(Q, Self),
diff --git a/deps/rabbitmq_management/priv/www/js/global.js b/deps/rabbitmq_management/priv/www/js/global.js
index 2b92175742b1..7ad667e25302 100644
--- a/deps/rabbitmq_management/priv/www/js/global.js
+++ b/deps/rabbitmq_management/priv/www/js/global.js
@@ -256,6 +256,9 @@ var HELP = {
'queue-dead-lettered':
'Applies to messages dead-lettered with dead-letter-strategy at-least-once
.',
+ 'queue-delivery-limit':
+ 'The number of times a message can be returned to this queue before it is dead-lettered (if configured) or dropped.',
+
'queue-message-body-bytes':
'
The sum total of the sizes of the message bodies in this queue. This only counts message bodies; it does not include message properties (including headers) or metadata used by the queue.
Note that "in memory" and "persistent" are not mutually exclusive; persistent messages can be in memory as well as on disc, and transient messages can be paged out if memory is tight. Non-durable queues will consider all messages to be transient.
If a message is routed to multiple queues on publication, its body will be stored only once (in memory and on disk) and shared between queues. The value shown here does not take account of this effect.
', diff --git a/deps/rabbitmq_management/priv/www/js/tmpl/queue.ejs b/deps/rabbitmq_management/priv/www/js/tmpl/queue.ejs index ea141f0256bf..e027b32c2c81 100644 --- a/deps/rabbitmq_management/priv/www/js/tmpl/queue.ejs +++ b/deps/rabbitmq_management/priv/www/js/tmpl/queue.ejs @@ -92,17 +92,29 @@