• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sonus21 / rqueue / 25600409404

09 May 2026 11:49AM UTC coverage: 83.347%. First build
25600409404

Pull #295

github

web-flow
Merge ace5e3c2a into 9757517ae
Pull Request #295: Nats v2 web

2564 of 3407 branches covered (75.26%)

Branch coverage included in aggregate %.

795 of 1072 new or added lines in 22 files covered. (74.16%)

7711 of 8921 relevant lines covered (86.44%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/rqueue-core/src/main/java/com/github/sonus21/rqueue/core/spi/SubscriberView.java
1
/*
2
 * Copyright (c) 2026 Sonu Kumar
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * You may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and limitations under the License.
14
 *
15
 */
16

17
package com.github.sonus21.rqueue.core.spi;
18

19
/**
20
 * Per-subscriber row surfaced by {@link MessageBroker#subscribers} for the queue-detail
21
 * dashboard. Each entry corresponds to one logical consumer attached to the queue:
22
 *
23
 * <ul>
24
 *   <li>On Redis, one entry per {@code @RqueueListener} method (handlers all share the
25
 *       same backing list, so {@code pending} is the same on every row and
26
 *       {@code pendingShared} is {@code true}).
27
 *   <li>On NATS JetStream, one entry per durable consumer. {@code pending} is the
28
 *       per-consumer {@code numPending} for Limits retention (exact, divergent across
29
 *       rows) and the shared {@code msgCount} for WorkQueue retention (same on every
30
 *       row, {@code pendingShared = true}).
31
 * </ul>
32
 *
33
 * @param consumerName logical consumer / handler name (from {@code @RqueueListener.consumerName}
34
 *     when set, otherwise a backend-derived name like {@code rqueue-<queue>}).
35
 * @param pending messages waiting to be processed by this subscriber.
36
 * @param inFlight messages this subscriber has received but not yet acknowledged.
37
 * @param pendingShared {@code true} when {@code pending} is a queue-wide aggregate rather
38
 *     than this subscriber's exclusive backlog. The dashboard renders these with a
39
 *     "(shared)" hint so it's clear the figure is not per-consumer.
40
 */
41
public record SubscriberView(
1✔
42
    String consumerName, long pending, long inFlight, boolean pendingShared) {
43

44
  public SubscriberView(String consumerName, long pending, long inFlight) {
NEW
45
    this(consumerName, pending, inFlight, false);
×
NEW
46
  }
×
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc