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

php-nats-jetstream-client 2.27.0

An async-first NATS and JetStream client for PHP 8.2+, covering core NATS, JetStream, KeyValue, ObjectStore and microservices.

open source · bsd-3-clausefreephp 8.2+ + amp + nats jetstream
PHP-NATS-JETSTREAM-CLIENT(1)User CommandsPHP-NATS-JETSTREAM-CLIENT(1)

NAME

php-nats-jetstream-client - an async-first NATS and JetStream client for PHP 8.2+, covering core NATS, JetStream, KeyValue, ObjectStore and microservices

DESCRIPTION

An async-first NATS and JetStream client for PHP 8.2+, built on Amp. It gives a typed, high-level API for connections, publish/subscribe, request/reply, reconnect handling, authentication and JetStream resource management, without falling back to blocking I/O.

It is meant for real applications: service-to-service messaging, event processing, JetStream-backed persistence and NATS microservice discovery. This site publishes its live events with it. Quality gates include PHPStan level 8, thousands of unit tests on PHP 8.2 to 8.5, live integration tests and mutation testing.

FEATURES

--core
Publish/subscribe, request/reply and scatter-gather, with reconnects, server rotation and graceful drain.
--jetstream
Streams and consumers (pull, push, ordered, ephemeral), publish acks, de-duplication and Direct Get.
--kv
KeyValue buckets with history, TTL and watch.
--objects
ObjectStore with chunked and streaming uploads and SHA-256 verification.
--services
The NATS microservices framework with PING, INFO, STATS and SCHEMA discovery.
--auth
Token, user and password, JWT with NKey signing, credentials files and TLS or mTLS.
--websocket
A WebSocket transport for ws:// and wss:// gateways, with optional compression.
--schedule
Scheduled publishing, atomic batch publish and distributed counters on NATS 2.12+.

$ php-nats-jetstream-client --price

free

  • Free to use in commercial and personal projects
  • Source code on GitHub under the BSD 3-Clause license

$ php-nats-jetstream-client --sponsor

php-nats-jetstream-client is free.
A coffee keeps it moving.

If php-nats-jetstream-client saves you time, you can support its development. It pays for the hours that go into fixes and new releases.

$ php-nats-jetstream-client --install

v2.27.0 · release notes ↗

# install: PHP 8.2+ $ composer require idct/php-nats-jetstream-client
github ↗