PHPackages                             lebrains/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. [API Development](/categories/api)
4. /
5. lebrains/lenats

AbandonedArchivedSymfony-bundle[API Development](/categories/api)

lebrains/lenats
===============

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

v0.4.7.1(6y ago)29.2k4[1 issues](https://github.com/LeBrains/LeNats/issues)GPL-3.0PHPPHP ^7.1.3

Since Jun 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/LeBrains/LeNats)[ Packagist](https://packagist.org/packages/lebrains/lenats)[ RSS](/packages/lebrains-lenats/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (19)Versions (14)Used By (0)

LeNats
======

[](#lenats)

Event-driven NATS streaming Symfony 4 bundle with Cloud Event standard

Install
-------

[](#install)

```
composer require lebrains/lentas

```

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)

```
