Repository navigation
v2.16.0
Minor release. A request() or requestMany() waiting on the shared reply inbox now fails at once when that inbox is dropped or rejected by an -ERR that another fiber's read brings (#180). Before, a request whose read was parked on the socket at that moment noticed the drop only with the server's next bytes or at its deadline.
Upgrading is recommended if your connections run near their subscription limit, or if requests run beside a processIncoming() loop. There are no API changes. symfony-nats-messenger 5.4.1 works with this release unchanged.
Fixed
- A dropped or rejected reply inbox did not wake the requests waiting on it (#180).
maximum subscriptions exceededbefore the inbox is confirmed drops it, and a permissions violation naming it rejects it; both happen inline in the frame's dispatch. A request notices either at its next look, and a request whose read was parked on the socket when another fiber's read brought the-ERRhad nothing to wake it: it waited for the server's next bytes or its deadline. Each request's wake-up is now registered with its waiter on the inbox, and dropping or rejecting the inbox fires them all, ending the request's read and also its wait for the read slot while another operation's read (a poll's, a flush's) holds the socket: the request fails at once with the documented error, or returns a reply delivered by then;requestMany()with replies collected returns them. A terminal close while a request waits for its reply now ends the request at its next look withConnection is not open, the message its next read would have given it; this is the exit of a request a rejection woke right before an error listener answered the-ERRwithdisconnect().
Quality gates
- PHPStan level 8.
- 2816 unit tests (with data sets) on PHP 8.2 to 8.5, 149 live integration tests and 48 Behat scenarios.
- All 45 runnable examples executed against a live server.
- Statement coverage 98.99% from the unit suite (95% floor enforced in CI) and 99.06% combined (97% floor).
- Infection covered MSI 93.6% over the 3881 mutants it ran (90% floor enforced in CI); it skipped 3904 of the 7785 it generated as too slow, so the score does not include them.
- Every fix has tests that fail on the old code: the parked requests ended only at their 3 s deadline. On a real nats-server with
max_subscriptions: 2and AmpSocketTransport, the request failed as soon as the-ERRwas read. - The change was reviewed for semantics and for interleavings by two independent reviewers, and their findings were applied.
- symfony-nats-messenger 5.4.1's suites pass against this release: PHPStan level max, 528 unit tests, 52 functional scenarios against live NATS and 5 examples.
The full record is in the CHANGELOG.