PHPackages                             vseinstrumentiru/lenats - 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. [Framework](/categories/framework)
4. /
5. vseinstrumentiru/lenats

AbandonedArchivedSymfony-bundle[Framework](/categories/framework)

vseinstrumentiru/lenats
=======================

The LeNats is a Symfony bundle. it's implements event-based architecture with nats streaming on php

v0.4.18(5y ago)14.1k1[1 issues](https://github.com/vseinstrumentiru/LeNats/issues)GPL-3.0-onlyPHPPHP &gt;=7.3

Since Jun 13Pushed 5y agoCompare

[ Source](https://github.com/vseinstrumentiru/LeNats)[ Packagist](https://packagist.org/packages/vseinstrumentiru/lenats)[ RSS](/packages/vseinstrumentiru-lenats/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (18)Versions (23)Used By (0)

LeNats
======

[](#lenats)

[![build](https://github.com/vseinstrumentiru/LeNats/workflows/build/badge.svg)](https://github.com/vseinstrumentiru/LeNats/actions)[![coverage](https://camo.githubusercontent.com/3761d154c37243dd8fa432f9e97f79865542a72f90cb050515177b084e8583c5/68747470733a2f2f636f6465636f762e696f2f67682f767365696e737472756d656e746972752f4c654e6174732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/vseinstrumentiru/LeNats)

Event-driven NATS streaming Symfony 3/4 bundle with Cloud Event standard.

Install
-------

[](#install)

```
composer require vseinstrumentiru/lenats

```

Configuration
-------------

[](#configuration)

In `config/packages/le_nats.yaml`:

```
le_nats:
  connection:
    dsn: 'tcp://your-nats/host' # Required.
    client_id: 'unique_app_client_id' # Required. A unique identifier for a client. See ConnectRequest in https://nats.io/documentation/streaming/nats-streaming-protocol/
    cluster_id: 'your_nats_cluster_id' # Required. Cluster ID from nats streaming configuration. See https://github.com/nats-io/nats-streaming-server#configuration-file
    verbose: false # Optional. by default false, if you need additional set it to true

    context: # Optional. if you need additional configuration for TLS or TCP (will added soon) - you can define it here
      tls:
        protocol: tlsv1.2
        ciphers: ECDHE-RSA-AES256-GCM-SHA384
        peer_name: 'connection_peer_name'
        verify_peer: false
        verify_peer_name: false
        allow_self_signed: true

  accept_events: # Optional.
    # If you want to accept specific Event Object for each event - you can define it here
    # Here application.test.created - event type (or name)
    # App\Events\TestCloudEvent - class for this event
    # Class App\Events\TestCloudEvent MUST inherit LeNats\Events\CloudEvent
    application.test.created: App\Events\TestCloudEvent
```

Workflow
--------

[](#workflow)

### Publishing

[](#publishing)

```
