PHPackages                             thesis/nats - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. thesis/nats

ActiveLibrary[HTTP &amp; Networking](/categories/http)

thesis/nats
===========

Async (fiber based) client for Nats.

0.4.0(6mo ago)661.8k↓26.9%1[1 PRs](https://github.com/thesis-php/nats/pulls)MITPHPPHP ^8.3CI passing

Since Jul 24Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/thesis-php/nats)[ Packagist](https://packagist.org/packages/thesis/nats)[ Fund](https://www.tinkoff.ru/cf/5MqZQas2dk7)[ RSS](/packages/thesis-nats/feed)WikiDiscussions 0.4.x Synced 1mo ago

READMEChangelog (4)Dependencies (11)Versions (16)Used By (0)

Thesis Nats
===========

[](#thesis-nats)

Pure non-blocking (fiber based) strictly typed full-featured PHP driver for NATS.

Features
--------

[](#features)

- [NATS Core](https://docs.nats.io/nats-concepts/core-nats)
    - [Publish-Subscribe](#pub-sub)
    - [Queues](#queues)
    - [Request-Reply](#request-reply)
- [NATS JetStream](https://docs.nats.io/nats-concepts/jetstream)
    - [Fetch Batch](#fetch-batch)
    - [Fetch Bytes](#fetch-bytes)
    - [Fetch Immediate](#fetch-immediate)
    - [Push Consumer](#push-consumer)
    - [Pull Consumer](#pull-consumer)
    - [Get message](#get-message)
- [NATS KV](https://docs.nats.io/nats-concepts/jetstream/key-value-store)
    - [Store key values](#store-key-values)
    - [Watch KV](#watch-kv)
- [NATS ObjectStore](https://docs.nats.io/nats-concepts/jetstream/obj_store)
    - [Store objects](#store-objects-in-the-buckets)
    - [Watch Object Store](#watch-object-store)
- [NATS CRDT](#nats-crdt)
    - [Add Counter](#add-counter)
    - [Get Counter](#get-counter)
    - [Get Counters](#get-counters)
- [NATS Message Scheduler](#nats-message-scheduler)
    - [Single scheduled message](#single-scheduled-message)
- [NATS JetStream Batch Publishing](#nats-jetstream-batch-publishing)
    - [Publish using `PublishBatch`](#publish-using-publishbatch)
    - [Publish using `JetStream`](#publish-batch-using-jetstream)
- [Nats Service Api](#nats-service-api)
    - [Micro Service](#micro-service)
    - [Endpoints](#service-endpoints)
    - [Groups](#groups)

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

[](#installation)

```
composer require thesis/nats
```

Nats Core
---------

[](#nats-core)

The library implements the full functionality of NATS Core, including pub-sub, queues and request–reply.

#### Pub-Sub

[](#pub-sub)

```
