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

sonus21 / rqueue / 25600722838

09 May 2026 12:06PM UTC coverage: 83.396% (-5.3%) from 88.677%
25600722838

push

github

web-flow
Nats v2 web (#295)

* ci: compile main sources in coverage_report job

The coverage_report job was producing an effectively empty
jacocoTestReport.xml (3.4KB vs ~1.1MB locally) because no .class files
existed when coverageReportOnly ran — the job checked out source code
and downloaded .exec artifacts, but never compiled. JaCoCo's report
generator skips packages/classes it cannot resolve, so the merged XML
ended up with only <sessioninfo> entries and no <package> elements.

That made coverallsJacoco silently no-op via the
"source file set empty, skipping" branch in CoverallsReporter, so
"Push coverage to Coveralls" reported success without uploading.

Verified by downloading the coverage-report artifact from a recent run
and comparing its XML structure against a local build's report.

Assisted-By: Claude Code

* nats-web: implement pause / soft-delete admin ops and capability-aware Q-detail

Replace the all-stub `NatsRqueueUtilityService` with real impls for the operations
JetStream can model: `pauseUnpauseQueue` persists the `paused` flag on `QueueConfig`
in the queue-config KV bucket and notifies the local listener container so the poller
stops dispatching; `deleteMessage` is a soft delete via `MessageMetadataService`
(stream message persists, dashboard hides via the metadata flag); `getDataType`
reports `STREAM`. `moveMessage`, `enqueueMessage`, and `makeEmpty` deliberately
remain "not supported" — there is no JetStream primitive for those.

Update `RqueueQDetailServiceImpl.getRunningTasks` / `getScheduledTasks` to return
header-only tables when the broker capabilities suppress those sections, instead of
emitting zero rows or 501s on NATS.

20 new unit tests cover the pause/delete paths and lock in the still-unsupported
operations. Updates `nats-task.md` / `nats-task-v2.md` to reflect what landed.

Assisted-By: Claude Code

* nats-web: capability-aware nav / charts and stream-based peek

End-to-end browser-tested the NATS dashboard and shipped the t... (continued)

2566 of 3407 branches covered (75.32%)

Branch coverage included in aggregate %.

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

312 existing lines in 38 files now uncovered.

7715 of 8921 relevant lines covered (86.48%)

0.86 hits per line

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

80.95
/rqueue-core/src/main/java/com/github/sonus21/rqueue/core/RqueueMessage.java
1
/*
2
 * Copyright (c) 2019-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;
18

19
import com.fasterxml.jackson.annotation.JsonIgnore;
20
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
21
import com.github.sonus21.rqueue.models.SerializableBase;
22
import lombok.AllArgsConstructor;
23
import lombok.Builder;
24
import lombok.Getter;
25
import lombok.NoArgsConstructor;
26
import lombok.Setter;
27
import lombok.ToString;
28
import org.springframework.messaging.MessageHeaders;
29

30
/**
31
 * Envelope for a message being processed through Rqueue. Each message maintains its own state
32
 * including serialized content, retry metadata, failure counts, and timing information.
33
 *
34
 * <p><b>Message Content.</b> The {@code message} field holds the serialized (JSON) representation
35
 * of the user's object. Use {@link com.github.sonus21.rqueue.core.support.RqueueMessageUtils}
36
 * to convert between serialized and object form.
37
 *
38
 * <p><b>Timing and Scheduling.</b> {@code queuedTime} records when the message was enqueued
39
 * (nanosecond precision). {@code processAt} defines the intended processing time (for delayed
40
 * messages). {@code reEnqueuedAt} tracks the last re-queue timestamp following failure.
41
 *
42
 * <p><b>Failure Tracking.</b> {@code failureCount} and {@code sourceQueueFailureCount} track
43
 * retries in the current and source queue respectively. Once retries are exhausted, the message
44
 * may be routed to the configured dead-letter queue ({@code sourceQueueName}).
45
 *
46
 * <p><b>Periodic Tasks.</b> For messages representing recurring work, the {@code period} field
47
 * (in milliseconds) defines the recurrence interval. Use {@code nextProcessAt()} to compute the
48
 * next scheduling time.
49
 */
50
@Getter
51
@Setter
52
@ToString
53
@NoArgsConstructor
54
@AllArgsConstructor
55
@JsonPropertyOrder({"failureCount"})
56
@Builder(toBuilder = true)
57
public class RqueueMessage extends SerializableBase {
58

59
  private static final long serialVersionUID = -3488860960637488519L;
60
  // The message id, each message has a unique id
61
  private String id;
62
  // Queue name on which message was enqueued
63
  private String queueName;
64
  /**
65
   * JSON encoded message, this message can be converted to actual object with the help of
66
   * {@link com.github.sonus21.rqueue.core.support.RqueueMessageUtils#convertMessageToObject}
67
   * method
68
   */
69
  private String message;
70
  // Any retry count used while enqueueing
71
  private Integer retryCount;
72
  // when this message was enqueued, this is in nanosecond
73
  private long queuedTime;
74
  // when this message was supposed to be processed
75
  private long processAt;
76
  // The time when it was re-enqueue due to failure.
77
  private Long reEnqueuedAt;
78
  // Number of times this message has failed in this queue
79
  private int failureCount;
80
  // Continuous failure of message listener can land  this message to  dead letter queue
81
  // Number of times this message has failed in the source queue
82
  private int sourceQueueFailureCount;
83
  // Source queue name
84
  private String sourceQueueName;
85

86
  // period of this task, if this is a periodic task.
87
  private long period;
88

89
  @ToString.Exclude
90
  @JsonIgnore
91
  private MessageHeaders messageHeaders;
92

93
  @JsonIgnore
94
  public RqueueMessage updateReEnqueuedAt() {
95
    reEnqueuedAt = System.currentTimeMillis();
1✔
96
    return this;
1✔
97
  }
98

99
  @Override
100
  public boolean equals(Object other) {
101
    if (other instanceof RqueueMessage) {
1✔
102
      RqueueMessage otherMessage = (RqueueMessage) other;
1✔
103
      if (otherMessage.getId() != null && getId() != null) {
1!
104
        return getId().equals(otherMessage.getId());
1✔
105
      }
106
    }
107
    return false;
1✔
108
  }
109

110
  @JsonIgnore
111
  public long nextProcessAt() {
112
    if (isPeriodic()) {
1!
113
      return processAt + period;
1✔
114
    }
UNCOV
115
    throw new IllegalStateException("Only applicable for periodic message");
×
116
  }
117

118
  @JsonIgnore
119
  public boolean isPeriodic() {
120
    return period > 0;
1✔
121
  }
122
}
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