lebrains/lenats
Lenats is a Laravel integration for NATS, the lightweight, high-performance messaging system. It offers a simple, Laravel-style API for publishing and subscribing to subjects, so you can add event-driven messaging to your applications with minimal setup.
LeNats is archived and marked DEPRECATED — treat it as a reference implementation for legacy Symfony apps already on NATS Streaming (STAN), not a greenfield choice. NATS Streaming itself was superseded by JetStream, the bundle has 0 dependents, and the GPL-3.0 license is a real constraint for proprietary apps. Read it for pattern ideas before you composer require.
If you're maintaining an existing install:
composer require lebrains/lenats (or restore from your composer.lock; archived packages tend to drop off Packagist eventually).config/bundles.php.DependencyInjection/Configuration.php — likely lenats: or le_nats:) with cluster ID, client ID, and NATS URL, and point it at a running nats-streaming-server (the nats-streaming Docker image works).order.created from your service after the DB commit, consume it in a separate Symfony app.Look first at the bundle's Service//Publisher/ classes and any examples in tests — those are the only reliable docs.
type/event header and a version field; consumers route on the header without parsing the payload twice.App\Event\* objects at the boundary, then use normal listeners.MessageBusInterface::dispatch() so retries/transports stay in one place.DateTime, enums, and binary blobs. Pick explicit formats and test round-trips.bin/console cache:clear after editing the bundle config; DI compiler passes rarely invalidate on their own.nats-streaming-server logs and the monitoring port tell you more than the PHP layer; capture the raw message before mapping it to a domain event.basis-company/nats against JetStream, you change one class instead of every caller.basis-company/nats.php (JetStream) or Symfony Messenger with a community NATS transport — both maintained.How can I help you explore Laravel packages today?