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

nats-io / nats-server / 21975509826
84%

Build:
DEFAULT BRANCH: main
Ran 13 Feb 2026 06:16AM UTC
Jobs 1
Files 61
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Feb 2026 10:39AM UTC coverage: 84.661% (-0.005%) from 84.666%
21975509826

push

github

web-flow
(2.14) Reset consumer to new starting sequence (#7489)

Currently we don't offer durable ordered consumption of a stream. We do
support ephemeral ordered push consumers, but those can be problematic
when using those on WQ/Interest streams as as soon as the server sends
the message the "ack" happens immediately, resulting in the message to
be removed. Similarly recreating the consumer (through delete+create)
may lose interest and remove messages. Durable consumers could be used
for guaranteed ordered consumption by using the "pinning" introduced in
2.11, ensuring only one app instance, combined with resetting it to a
sequence. Setting the `FilterSubject(s)` to all subjects that need
sequential ordering.

This PR introduces a new API to reset the starting sequence of a
consumer, such that it can be used for ordered durable consumption.
Sending a request to `$JS.API.CONSUMER.RESET.<stream>.<consumer>` with
`{"seq":10}` will reset all state of the consumer and move it (either
forwards or backwards) to the specified sequence. When fetching
messages, the first message to be delivered will be the one with the
specified sequence, the consumer's delivered sequence will (re)start at
1.

This feature unlocks ordering guarantees for durable consumers. When
combined with "pinning", there's ordered consumption to a specific app
instance, until it's unpinned and the ordered delivery continues to
another app.

Resolves https://github.com/nats-io/nats-server/issues/4121,
https://github.com/nats-io/nats-server/issues/7106,
https://github.com/nats-io/nats-server/issues/4855,
https://github.com/nats-io/nats-server/issues/2090
Relates to https://github.com/nats-io/nats-server/issues/7493,
https://github.com/nats-io/nats-server/issues/4273,
https://github.com/nats-io/nats-server/issues/2043

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

74746 of 88289 relevant lines covered (84.66%)

344374.21 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
94.0
0.08% src/github.com/nats-io/nats-server/server/gateway.go
2
87.16
0.04% src/github.com/nats-io/nats-server/server/monitor.go
5
79.35
0.15% src/github.com/nats-io/nats-server/server/opts.go
7
86.3
-0.19% src/github.com/nats-io/nats-server/server/events.go
9
80.72
0.0% src/github.com/nats-io/nats-server/server/store.go
16
86.77
-0.47% src/github.com/nats-io/nats-server/server/accounts.go
23
87.98
-0.45% src/github.com/nats-io/nats-server/server/raft.go
47
82.65
-0.09% src/github.com/nats-io/nats-server/server/memstore.go
94
82.69
-0.11% src/github.com/nats-io/nats-server/server/filestore.go
430
55.4
-0.04% src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go
444
88.15
-0.2% src/github.com/nats-io/nats-server/server/consumer.go
718
73.85
0.06% src/github.com/nats-io/nats-server/server/jetstream_api.go
969
82.58
-0.01% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
Jobs
ID Job ID Ran Files Coverage
1 21975509826.1 13 Feb 2026 06:16AM UTC 61
84.66
GitHub Action Run
Source Files on build 21975509826
  • Tree
  • List 61
  • Changed 20
  • Source Changed 7
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21975509826
  • db6f4d22 on github
  • Prev Build on main (#21934476537)
  • Next Build on main (#22011611671)
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