skip to content
szczecin 53.43N 14.55E ./start-project

php-nats-jetstream-client 2.33: rewind a consumer in place

(php, nats, release-notes) 18 min read by Bartosz Pachołek

2.33.0 adds resetConsumer(): on nats-server 2.14 a durable consumer can replay from a sequence, get back what was never acked or skip a bad range, without being deleted and recreated. Plus a fix for ordered consumers reset by another client.

idct/php-nats-jetstream-client 2.33.0 is out, and it adds one call: resetConsumer(). nats-server 2.14 can reset a consumer's delivery state in place, so a durable consumer can replay messages after a bug fix, get back what a crashed worker never acknowledged, or step over a range it cannot process. Until now a PHP application had to delete the consumer and create it again for that. The release also fixes an ordered consumer, and with it KeyValue and Object Store watches, that stalled when another client reset its consumer while it was idle.

Our last post on the client covered 2.31.1 and 2.32.0, and 2.33.0 is the only release since. We ran every example below on PHP 8.5.9 against nats-server 2.14.10 and 2.12.15 in Docker, with 2.33.0 from Packagist and, for the before-and-after comparisons, 2.32.0. The output is pasted as it came out.

Upgrading

bash
composer require idct/php-nats-jetstream-client:^2.33

Existing calls need no change: resetConsumer() is new, and the new constructor argument of ConsumerInfo is optional. Before you use the new call, check these:

  • resetConsumer() needs nats-server 2.14. On an older server it throws an UnsupportedFeatureException, which is a JetStreamException, and sends nothing. Catch it, or ask first with FeatureSupport::serverIsOlderThan($client->serverInfo()?->version, '2.14').
  • A reset of a consumer that does not exist ends in a timeout, not in a "not found" error. Call getConsumer() first when you need to tell the two apart.
  • A reset made while the client fails over to another server is checked against the version of the server it is leaving. Leaving a pre-2.14 server for a newer one, the call is refused: make it again once connected. Leaving a 2.14 server for an older one, the request is sent and times out.
  • Code that compares the text of the push consumer's regression report needs the new wording, replaced or reset (sequence regressed).

The full record is in the changelog at v2.33.0.

Why reset a consumer instead of recreating it

A durable consumer remembers where it is: which stream messages it has delivered, which of them were acknowledged (everything up to its ack floor), and which still wait for an ack. Sometimes that position is the wrong one. A handler had a bug and processed a day of orders badly, so you want those orders again. Or a few malformed messages crash every worker that touches them, and you want the consumer past them.

Before nats-server 2.14 the way to move a durable consumer was to delete it and create it again with a new start. The issue behind this release lists what that costs: the consumer is gone for a while, it loses its pending state and its pin, and the delete races with the clients bound to it. nats-server 2.14.0 added an API that resets the delivery state in place, $JS.API.CONSUMER.RESET, described in ADR-60 in the NATS architecture repository. nats.go offers it as ResetConsumer() and ResetConsumerToSequence(), and 2.33.0 brings it to PHP as one call:

  • resetConsumer($stream, $consumer), or with sequence 0: delivery goes on just above the ack floor. What was delivered but not acknowledged is delivered again.
  • resetConsumer($stream, $consumer, $sequence): the next message delivered is the first one at or after that stream sequence, backward or forward.

Either way the pending and redelivery state is dropped and the consumer sequence starts again at 1. The call resolves to the ConsumerInfo the server answers with, and its new resetSequence property is the stream sequence the next delivery starts from.

GitHub issue 274 of php-nats-jetstream-client, closed by pull request 275: nats-server 2.14 added a consumer reset API and the client had no call for it

A proof of concept you can run

Two NATS servers in Docker, four scripts, and the client from Packagist:

yaml
services:
  nats-2-14:
    image: nats:2.14-alpine
    command: ["-js"]
    ports: ["14414:4222"]
  nats-2-12:
    image: nats:2.12-alpine
    command: ["-js"]
    ports: ["14412:4222"]
json
{
    "require": {
        "php": "^8.2",
        "idct/php-nats-jetstream-client": "^2.33"
    }
}

replay.php creates a stream ORDERS with six messages and a durable pull consumer PROC with explicit acks, then plays through three situations: a replay after a bug fix, a worker that died before acking, and a range to skip. Each fetched message is printed with its stream sequence and its consumer sequence: order-2 (s2/c1) is stream message 2, delivered as the consumer's first message.

php
<?php
// replay.php: replay, redeliver and skip on a durable consumer, without recreating it.
declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use IDCT\NATS\Connection\NatsOptions;
use IDCT\NATS\Core\NatsClient;
use IDCT\NATS\JetStream\Models\ConsumerInfo;

$url = $argv[1] ?? 'nats://127.0.0.1:4222';
$client = new NatsClient(new NatsOptions(servers: [$url]));
$client->connect()->await();
$js = $client->jetStream();
echo 'server ', $client->serverInfo()?->version, PHP_EOL;

// A fresh stream with six orders, and a durable pull consumer that acks explicitly.
try {
    $js->deleteStream('ORDERS')->await();
} catch (\Throwable) {
    // first run: nothing to delete
}
$js->createStream('ORDERS', ['orders.>'])->await();
for ($i = 1; $i <= 6; $i++) {
    $js->publish('orders.new', "order-$i")->await();
}
$config = ['ack_policy' => 'explicit'];
$created = $js->createConsumer('ORDERS', 'PROC', null, $config)->await();

// Fetch up to $n messages and ack them, unless told not to.
// Each one is printed as "payload (stream sequence/consumer sequence)".
$take = function (int $n, bool $ack = true) use ($js): void {
    $got = [];
    foreach ($js->fetchBatch('ORDERS', 'PROC', $n, 1000)->await() as $message) {
        $meta = $js->messageMetadata($message);
        $got[] = sprintf(
            '%s (s%d/c%d)',
            $message->payload,
            $meta->streamSequence,
            $meta->consumerSequence,
        );
        if ($ack) {
            $js->ackSync($message)->await();
        }
    }
    echo '  fetched ', implode(', ', $got ?: ['nothing']);
    echo $ack ? '' : ', not acked', PHP_EOL;
};

// What the reset left: where delivery goes on, the ack floor and what is pending.
$show = function (ConsumerInfo $info): void {
    printf(
        "  reset: next from s%d, ack floor s%d, %d pending, %d awaiting ack\n",
        $info->resetSequence,
        $info->raw['ack_floor']['stream_seq'] ?? -1,
        $info->raw['num_pending'] ?? -1,
        $info->raw['num_ack_pending'] ?? -1,
    );
};

echo "1. The worker handles order-1 to order-4.\n";
$take(4);

echo "2. A bug in the handler is fixed: replay from stream sequence 2.\n";
$show($js->resetConsumer('ORDERS', 'PROC', 2)->await());
$take(3);

echo "3. The worker fetches two orders and dies before acking them.\n";
$take(2, ack: false);
echo "   Back to the ack floor, no sequence given:\n";
$show($js->resetConsumer('ORDERS', 'PROC')->await());
$take(2);

echo "4. order-7 and order-8 crash the handler. Skip to stream sequence 9.\n";
foreach (['order-7', 'order-8', 'order-9'] as $payload) {
    $js->publish('orders.new', $payload)->await();
}
$show($js->resetConsumer('ORDERS', 'PROC', 9)->await());
$take(3);

$info = $js->getConsumer('ORDERS', 'PROC')->await();
$same = ($info->raw['created'] ?? null) === ($created->raw['created'] ?? '');
printf(
    "After three resets: consumer %s, created %s, %s\n",
    $info->name,
    substr((string) ($info->raw['created'] ?? '?'), 0, 19),
    $same ? 'unchanged' : 'NEW',
);
$messages = $js->getStream('ORDERS')->await()->raw['state']['messages'] ?? '?';
echo "The stream still holds $messages messages.", PHP_EOL;
$client->disconnect()->await();

The commands for all four scripts:

bash
docker compose up -d
composer install
php replay.php nats://127.0.0.1:14414     # nats-server 2.14
php refusals.php nats://127.0.0.1:14414
php refusals.php nats://127.0.0.1:14412   # nats-server 2.12
php ordered.php nats://127.0.0.1:14414
php push.php nats://127.0.0.1:14414

replay.php with 2.33.0 on nats-server 2.14.10:

text
server 2.14.10
1. The worker handles order-1 to order-4.
  fetched order-1 (s1/c1), order-2 (s2/c2), order-3 (s3/c3), order-4 (s4/c4)
2. A bug in the handler is fixed: replay from stream sequence 2.
  reset: next from s2, ack floor s1, 5 pending, 0 awaiting ack
  fetched order-2 (s2/c1), order-3 (s3/c2), order-4 (s4/c3)
3. The worker fetches two orders and dies before acking them.
  fetched order-5 (s5/c4), order-6 (s6/c5), not acked
   Back to the ack floor, no sequence given:
  reset: next from s5, ack floor s4, 2 pending, 0 awaiting ack
  fetched order-5 (s5/c1), order-6 (s6/c2)
4. order-7 and order-8 crash the handler. Skip to stream sequence 9.
  reset: next from s9, ack floor s8, 1 pending, 0 awaiting ack
  fetched order-9 (s9/c1)
After three resets: consumer PROC, created 2026-11-26T10:18:11, unchanged
The stream still holds 9 messages.

What the run shows:

  • A reset to a sequence moves the consumer, backward here. After the reset to 2 the next message is order-2 again, and the consumer sequence starts over at c1. The ack floor moves to just below the new start, s1, so order-2 to order-6 count as pending again.
  • A reset without a sequence goes back to the ack floor. The worker took order-5 and order-6 and never acked them. Without a reset they would come back only once the consumer's ack wait ran out. The reset drops the pending state at once (0 awaiting ack), and both are delivered straight away.
  • A reset forward skips. After the reset to 9 the ack floor is s8, so PROC will not be given order-7 or order-8. The messages themselves stay: the stream still holds all nine, and only this consumer moved past them.
  • It is the same consumer throughout, with the same name and the same creation time. Nothing bound to it had to let go.

GitHub release page of php-nats-jetstream-client v2.33.0: resetConsumer() resets a durable consumer's delivery state on nats-server 2.14, to replay from a sequence or go back to the ack floor

When a reset does not happen

A reset can fail in four ways, and each fails differently. refusals.php tries all of them. LIVE is a consumer with deliver_policy: new, GHOST does not exist, and the client's request timeout is set to 2 seconds:

php
<?php
// refusals.php: the resets that do not happen, and how each one fails.
declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use IDCT\NATS\Connection\NatsOptions;
use IDCT\NATS\Core\NatsClient;
use IDCT\NATS\Exception\JetStreamException;

$url = $argv[1] ?? 'nats://127.0.0.1:4222';
$client = new NatsClient(new NatsOptions(servers: [$url], requestTimeoutMs: 2000));
$client->connect()->await();
$js = $client->jetStream();
echo 'server ', $client->serverInfo()?->version, PHP_EOL;

try {
    $js->deleteStream('ORDERS')->await();
} catch (\Throwable) {
    // first run: nothing to delete
}
$js->createStream('ORDERS', ['orders.>'])->await();
$js->publish('orders.new', 'order-1')->await();
$js->createConsumer('ORDERS', 'PROC', null, ['ack_policy' => 'explicit'])->await();
// A consumer that delivers only messages published after it was created.
$live = ['ack_policy' => 'explicit', 'deliver_policy' => 'new'];
$js->createConsumer('ORDERS', 'LIVE', null, $live)->await();

$try = function (string $what, \Closure $reset): void {
    $started = hrtime(true);
    try {
        $info = $reset();
        printf("%s: done, next from s%d\n", $what, $info->resetSequence);
    } catch (\Throwable $e) {
        $class = (new \ReflectionClass($e))->getShortName();
        $errCode = $e instanceof JetStreamException ? $e->getErrCode() : null;
        printf(
            "%s: %s, code %d%s, after %.1f s\n",
            $what,
            $class,
            $e->getCode(),
            $errCode === null ? '' : ", err_code $errCode",
            (hrtime(true) - $started) / 1e9,
        );
        echo '  ', wordwrap($e->getMessage(), 76, "\n  "), PHP_EOL;
    }
};

$try('PROC to -1', fn() => $js->resetConsumer('ORDERS', 'PROC', -1)->await());
$try('LIVE to 1', fn() => $js->resetConsumer('ORDERS', 'LIVE', 1)->await());
$try('GHOST', fn() => $js->resetConsumer('ORDERS', 'GHOST')->await());
$try('PROC to 1', fn() => $js->resetConsumer('ORDERS', 'PROC', 1)->await());
$client->disconnect()->await();

On nats-server 2.14.10:

text
server 2.14.10
PROC to -1: InvalidArgumentException, code 0, after 0.0 s
  The sequence of resetConsumer() must not be negative (null or 0 resets the
  consumer to its ack floor)
LIVE to 1: JetStreamException, code 400, err_code 10204, after 0.0 s
  invalid reset: not allowed
GHOST: TimeoutException, code 0, after 2.0 s
  Request timed out for subject $JS.API.CONSUMER.RESET.ORDERS.GHOST
PROC to 1: done, next from s1
  • A negative sequence is refused by the client before anything is sent.
  • A sequence the consumer's config does not allow is refused by the server. A sequence works only with a deliver_policy of all, by_start_sequence (not below opt_start_seq) or by_start_time (not before opt_start_time). LIVE delivers only new messages, so the server answers 400 with err_code 10204, which the client exposes as ApiErrCode::CONSUMER_INVALID_RESET. Compare $e->getErrCode() with it rather than the message text.
  • A consumer that does not exist gets no answer at all. The consumer itself answers its reset, so when there is no consumer, nothing answers and the call waits out the request timeout, 2 seconds here. That is the server's behavior on 2.14, not a client bug. If you need to tell "missing" from "slow", call getConsumer() first.

On nats-server 2.12.15:

text
server 2.12.15
PROC to -1: InvalidArgumentException, code 0, after 0.0 s
  The sequence of resetConsumer() must not be negative (null or 0 resets the
  consumer to its ack floor)
LIVE to 1: UnsupportedFeatureException, code 0, after 0.0 s
  Consumer reset requires NATS server 2.14+; older servers do not answer it
  (connected server 2.12.15; nothing was sent)
GHOST: UnsupportedFeatureException, code 0, after 0.0 s
  Consumer reset requires NATS server 2.14+; older servers do not answer it
  (connected server 2.12.15; nothing was sent)
PROC to 1: UnsupportedFeatureException, code 0, after 0.0 s
  Consumer reset requires NATS server 2.14+; older servers do not answer it
  (connected server 2.12.15; nothing was sent)

A server before 2.14 does not answer the reset either, so without a check every one of these calls would hang until the timeout. 2.33.0 reads the version the server advertised and refuses at once, naming the version it needs and the one it found. Only the negative sequence fails as before, since that check comes first. When the version cannot be read, behind a proxy or with a custom build, the release notes say the request is sent and an older server lets it time out. We did not run that case.

The fix: an ordered consumer that someone else resets

An ordered consumer is one the client manages itself: an ephemeral push consumer that the client recreates from its last in-order message whenever it sees a gap. KeyValue and Object Store watches are built on ordered consumers. ADR-60 asks clients to carry on when another process, the nats CLI for example, resets their consumer. According to the release notes, a pull consume and a push subscription already did, and an ordered consumer recovered too when the next delivery arrived with its consumer sequence back at 1.

One case did not recover: a reset forward, past the stream's last message, made while the ordered consumer was idle. No delivery follows such a reset, so nothing gave it away, and every new message was held back until the stream reached the reset sequence. ordered.php makes that happen. A worker connection reads the stream EVENTS through an ordered consumer with a heartbeat every 0.2 seconds. A second connection, standing in for an operator, resets the worker's consumer to sequence 100 while the stream ends at 3. It sends the raw API request that resetConsumer() sends, so the same script runs with 2.32.0, which has no such call.

php
<?php
// ordered.php: another client resets an idle ordered consumer forward.
declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use Amp\CancelledException;
use Amp\TimeoutCancellation;
use IDCT\NATS\Connection\NatsOptions;
use IDCT\NATS\Core\NatsClient;
use IDCT\NATS\Core\NatsMessage;

$url = $argv[1] ?? 'nats://127.0.0.1:4222';
$connect = function () use ($url): NatsClient {
    $client = new NatsClient(new NatsOptions(servers: [$url]));
    $client->connect()->await();
    return $client;
};
$admin = $connect();   // an operator, a script or the nats CLI
$worker = $connect();  // the application that reads the stream in order
$js = $admin->jetStream();
echo 'server ', $admin->serverInfo()?->version, PHP_EOL;

try {
    $js->deleteStream('EVENTS')->await();
} catch (\Throwable) {
    // first run: nothing to delete
}
$js->createStream('EVENTS', ['events.>'])->await();
foreach (['e-1', 'e-2', 'e-3'] as $payload) {
    $js->publish('events.app', $payload)->await();
}

$got = [];
$sid = $worker->jetStream()->subscribeOrderedConsumer(
    'EVENTS',
    function (NatsMessage $message) use (&$got): void {
        $got[] = $message->payload;
    },
    idleHeartbeatNs: 200_000_000, // a heartbeat every 0.2 s while idle
)->await();

// Let the worker read its socket for a while, as a long-running consumer would.
$run = function (float $seconds) use ($worker): void {
    $end = hrtime(true) / 1e9 + $seconds;
    while (hrtime(true) / 1e9 < $end) {
        try {
            $worker->processIncoming(new TimeoutCancellation(0.05))->await();
        } catch (CancelledException) {
            // nothing arrived in 50 ms
        }
    }
};
$consumers = fn(): string => implode(', ', $js->consumerNames('EVENTS')->await());

$run(1.0);
echo 'worker has: ', implode(', ', $got), PHP_EOL;
echo 'consumer: ', $consumers(), PHP_EOL;

// The admin moves the worker's consumer to stream sequence 100, past the last message.
// This is the request resetConsumer() sends; it is made raw so it runs on 2.32.0 too.
$name = $js->consumerNames('EVENTS')->await()[0];
$subject = '$JS.API.CONSUMER.RESET.EVENTS.' . $name;
$reply = json_decode($admin->request($subject, '{"seq":100}')->await()->payload, true);
echo 'admin reset it to 100: reset_seq ', $reply['reset_seq'], PHP_EOL;

$run(1.0);
foreach (['e-4', 'e-5'] as $payload) {
    $js->publish('events.app', $payload)->await();
}
echo 'published e-4 and e-5', PHP_EOL;
$run(3.0);
echo 'worker has: ', implode(', ', $got), PHP_EOL;
echo 'consumer: ', $consumers(), PHP_EOL;

$worker->jetStream()->stopOrderedConsumer($sid)->await();
$worker->disconnect()->await();
$admin->disconnect()->await();

With 2.32.0:

text
server 2.14.10
worker has: e-1, e-2, e-3
consumer: tkJ0aqEh
admin reset it to 100: reset_seq 100
published e-4 and e-5
worker has: e-1, e-2, e-3
consumer: tkJ0aqEh

e-4 and e-5 were published, and in the three seconds the script waits the worker never got them. The consumer is still the one from the start, now waiting for stream sequence 100. In a real application that wait could last until the stream grows that far, or for good.

With 2.33.0:

text
server 2.14.10
worker has: e-1, e-2, e-3
consumer: CTkZyUsD
admin reset it to 100: reset_seq 100
published e-4 and e-5
worker has: e-1, e-2, e-3, e-4, e-5
consumer: ord-2b188415fd8354e1b485c356

Both messages arrive, in order, with no duplicate. The consumer has a new name because the client recreated it, starting after its last in-order message, e-3. The idle heartbeat gave the reset away: it carries the last consumer sequence the server delivered, and after the reset that is 0, below the 3 the client had seen. 2.32.0 acted only on a heartbeat above what it had delivered, the sign of missed messages. 2.33.0 acts on one below it as well.

One limit remains, and the release states it: an ordered consumer that has delivered nothing since it was created or last recreated reports 0 before and after such a reset, so the client cannot tell the two apart. We did not run a KeyValue or Object Store watch through this; the release notes count them in because they use the same ordered consumer.

Push consumers: the report names the reset

A durable push subscription already carried on after a reset, and still does. push.php resets one backward to 2, then forward to 100, and prints what the error listener hears:

php
<?php
// push.php: another client resets a durable push consumer. What does the app see?
declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use Amp\CancelledException;
use Amp\TimeoutCancellation;
use IDCT\NATS\Connection\NatsOptions;
use IDCT\NATS\Core\NatsClient;
use IDCT\NATS\Core\NatsMessage;

$url = $argv[1] ?? 'nats://127.0.0.1:4222';
$errors = [];
$admin = new NatsClient(new NatsOptions(servers: [$url]));
$worker = new NatsClient(new NatsOptions(
    servers: [$url],
    errorListener: function (\Throwable $e) use (&$errors): void {
        $errors[] = $e->getMessage();
    },
));
$admin->connect()->await();
$worker->connect()->await();
$js = $admin->jetStream();
echo 'server ', $admin->serverInfo()?->version, PHP_EOL;

try {
    $js->deleteStream('PUSHED')->await();
} catch (\Throwable) {
    // first run: nothing to delete
}
$js->createStream('PUSHED', ['pushed.>'])->await();
foreach (['p-1', 'p-2', 'p-3'] as $payload) {
    $js->publish('pushed.app', $payload)->await();
}

$got = [];
$wjs = $worker->jetStream();
$wjs->subscribePushConsumer(
    'PUSHED',
    'PUSHER',
    function (NatsMessage $message) use (&$got, $wjs): void {
        $got[] = $message->payload;
        $wjs->ack($message)->await();
    },
    null,
    null,
    ['ack_policy' => 'explicit', 'idle_heartbeat' => 200_000_000],
)->await();

$run = function (float $seconds) use ($worker): void {
    $end = hrtime(true) / 1e9 + $seconds;
    while (hrtime(true) / 1e9 < $end) {
        try {
            $worker->processIncoming(new TimeoutCancellation(0.05))->await();
        } catch (CancelledException) {
            // nothing arrived in 50 ms
        }
    }
};

$run(1.0);
$reset = function (int $sequence) use ($admin, $run, &$got, &$errors): void {
    $got = $errors = [];
    $subject = '$JS.API.CONSUMER.RESET.PUSHED.PUSHER';
    $admin->request($subject, json_encode(['seq' => $sequence]))->await();
    $run(1.5);
    echo "admin reset PUSHER to $sequence, then the worker got: ";
    echo implode(', ', $got ?: ['nothing']), PHP_EOL;
    foreach ($errors as $error) {
        echo '  error listener: ', wordwrap($error, 72, "\n    "), PHP_EOL;
    }
};
echo 'worker has: ', implode(', ', $got), PHP_EOL;
$reset(2);   // backward: p-2 and p-3 are delivered again
$reset(100); // forward, past the last message: nothing to deliver yet
$js->deleteStream('PUSHED')->await();
$worker->disconnect()->await();
$admin->disconnect()->await();

With 2.32.0:

text
server 2.14.10
worker has: p-1, p-2, p-3
admin reset PUSHER to 2, then the worker got: p-2, p-3
admin reset PUSHER to 100, then the worker got: nothing
  error listener: Push consumer "PUSHER" on stream "PUSHED": consumer sequence mismatch -
    the server reports last delivered sequence 0 below the 2 already seen
    this session; the consumer appears to have been replaced (sequence
    regressed), rebasing gap detection to the new instance (ADR-9)

With 2.33.0:

text
server 2.14.10
worker has: p-1, p-2, p-3
admin reset PUSHER to 2, then the worker got: p-2, p-3
admin reset PUSHER to 100, then the worker got: nothing
  error listener: Push consumer "PUSHER" on stream "PUSHED": consumer sequence mismatch -
    the server reports last delivered sequence 0 below the 2 already seen
    this session; the consumer appears to have been replaced or reset
    (sequence regressed), rebasing gap detection to the new instance (ADR-9)

The backward reset replays p-2 and p-3 without a report in both releases. The forward reset leaves the server's last delivered sequence at 0, below what the client had seen, and the client reports that once through the error listener while delivery goes on. A reset restarts the consumer sequence at 1 just as a replaced consumer does, and the client cannot tell which of the two happened, so 2.33.0 names both. Only the wording changed. If your code matches on that text, update it.

Quality gates

From the release notes: PHPStan level 8; 4022 unit tests (with data sets) on PHP 8.2 to 8.5, 169 live integration tests and 51 Behat scenarios; all 47 runnable examples pass. Every changed line is covered (33 of 33), and total coverage is 99.11%. Infection reports a covered MSI of 92.98% against a 90% floor, with a caveat the release states itself: it skipped 5111 of the 9384 mutants it generated as too slow, so the score does not include them. The new acceptance class ConsumerResetTest has 24 cases, and 20 of them fail on 2.32.0.

CI's fixture server is nats-server 2.12, so CI runs one of the seven new live tests, the refusal before anything is sent, and skips the six that need the reset API. The pull request's author ran those six against nats-server 2.14.10, and they were not run again for the release. That is why we ran the 2.14 side for this post ourselves, on the same 2.14.10.

Get it

The client is free under the BSD-3-Clause license and needs PHP 8.2 or later. The php-nats-jetstream-client software page has the overview, and the source, issues and full changelog are on GitHub. If you run Symfony Messenger on NATS, the symfony-nats-messenger transport is built on this client.