PHPackages                             mwangaben/nats-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. mwangaben/nats-php-client

ActiveLibrary[Queues &amp; Workers](/categories/queues)

mwangaben/nats-php-client
=========================

Official PHP client for NATS messaging system

1.0.0(4mo ago)041MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Jan 10Pushed 4mo agoCompare

[ Source](https://github.com/mwangaben/nats-php-nats-client)[ Packagist](https://packagist.org/packages/mwangaben/nats-php-client)[ RSS](/packages/mwangaben-nats-php-client/feed)WikiDiscussions umbijani Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (2)Used By (1)

NATS PHP Client
===============

[](#nats-php-client)

[![Latest Version](https://camo.githubusercontent.com/bc46257910f3d055b3c50beb492cf568708b61747c921ea082f1333d29a77d5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6174732d7068702f6e6174732d636c69656e742e737667)](https://packagist.org/packages/nats-php/nats-client)[![Total Downloads](https://camo.githubusercontent.com/503c7d414d8d1e7c6f2ec173e9fd2d069225bfcabdec784e369f3f05a04c49de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6174732d7068702f6e6174732d636c69656e742e737667)](https://packagist.org/packages/nats-php/nats-client)[![License](https://camo.githubusercontent.com/9f1f476dffc2d8cf140f61e938afe5616d90082c8a2f3b75826916d18df90301/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e6174732d7068702f6e6174732d636c69656e742e737667)](https://packagist.org/packages/nats-php/nats-client)

Official PHP client for the NATS messaging system. NATS is a simple, secure and performant communications system for digital systems, services and devices.

Installation
------------

[](#installation)

```
composer require mwangaben/nats-php-nats-client
```

Features
--------

[](#features)

- Full NATS protocol support
- Publish/Subscribe messaging
- Request/Reply pattern
- Queue groups
- TLS/SSL support
- Automatic reconnection
- Connection pooling
- Multiple encoding formats (JSON, raw, etc.)
- Comprehensive error handling
- PSR standards compliant

Installation
------------

[](#installation-1)

```
composer require mwangaben/nats-php/nats-client
```

**CHANGELOG.md**
----------------

[](#changelogmd)

```
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2024-01-10

### Added
- Official NATS PHP client package
- Full NATS protocol support
- TLS/SSL encryption support
- Automatic reconnection with configurable attempts
- Queue groups support
- Request/Reply pattern (sync & async)
- Multiple encoders (JSON, Raw)
- Comprehensive error handling
- Connection statistics
- Debug logging
- PSR standards compliance
- Unit tests
- Examples and documentation

### Changed
- Complete rewrite with modern PHP practices
- Improved architecture with separation of concerns
- Better error messages and exceptions
- Enhanced performance and reliability

## [1.0.0] - Initial Release
- Basic NATS client functionality
- Publish/Subscribe support
- Basic authentication
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance78

Regular maintenance activity

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccbda990e5435d93d7569bc8f17b0528421b13d469c0b8023b86db3bc5a1e369?d=identicon)[mwangaben](/maintainers/mwangaben)

---

Top Contributors

[![mwangaben](https://avatars.githubusercontent.com/u/17113999?v=4)](https://github.com/mwangaben "mwangaben (3 commits)")

---

Tags

queuemessagingmicroservicespubsubnatsphp-natsnats-php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mwangaben-nats-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/mwangaben-nats-php-client/health.svg)](https://phpackages.com/packages/mwangaben-nats-php-client)
```

###  Alternatives

[nuwber/rabbitevents

The Nuwber RabbitEvents package

120515.8k3](/packages/nuwber-rabbitevents)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48030.5M87](/packages/queue-interop-queue-interop)[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[enqueue/enqueue-bundle

Message Queue Bundle

27615.6M38](/packages/enqueue-enqueue-bundle)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[basis-company/nats

nats jetstream client for php

201354.3k19](/packages/basis-company-nats)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
