Skip to content

Management: Add segment count to stream queue page (backport #12035) #12069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deps/rabbitmq_management/priv/www/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ var HELP = {
'queue-messages':
'<p>Message counts.</p><p>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.</p>',

'queue-messages-stream':
'<p>Approximate message counts.</p><p>Note that streams store some entries that are not user messages such as offset tracking data which is included in this count. Thus this value will never be completely correct.</p>',

'queue-dead-lettered':
'Applies to messages dead-lettered with dead-letter-strategy <code>at-least-once</code>.',

Expand Down
12 changes: 12 additions & 0 deletions deps/rabbitmq_management/priv/www/js/tmpl/queue.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,21 @@
<th>Readers</th>
<td><%= fmt_table_short(queue.readers) %></td>
</tr>
<tr>
<th>Segments</th>
<td><%= fmt_string(queue.segments) %></td>
</tr>
<% } %>
</table>

<table class="facts">
<tr>
<td></td>
<th class="horizontal">Total</th>
<% if (!is_stream(queue)) { %>
<th class="horizontal">Ready</th>
<th class="horizontal">Unacked</th>
<% } %>
<% if (is_quorum(queue)) { %>
<th class="horizontal">High priority</th>
<th class="horizontal">Normal priority</th>
Expand All @@ -147,17 +153,23 @@
<tr>
<th>
Messages
<% if (is_stream(queue)) { %>
<span class="help" id="queue-messages-stream"></span>
<% } else { %>
<span class="help" id="queue-messages"></span>
<% } %>
</th>
<td class="r">
<%= fmt_num_thousands(queue.messages) %>
</td>
<% if (!is_stream(queue)) { %>
<td class="r">
<%= fmt_num_thousands(queue.messages_ready) %>
</td>
<td class="r">
<%= fmt_num_thousands(queue.messages_unacknowledged) %>
</td>
<% } %>
<% if (is_quorum(queue)) { %>
<td class="r">
<%= fmt_num_thousands(queue.messages_ready_high) %>
Expand Down
Loading