flownative/nats
composer require flownative/nats
A NATS client for PHP.
dev-master
Readme excerpt
NATS PHP Client
A PHP implementation of a client for NATS.
? Please note that this package is currently under development and not ready for general use yet.
UsageInstall the package using composer:
composer require flownative/natsIn PHP, open a new connection with
use Flownative\Nats\Connection; // Connect to a server $nats = new Connection( 'nats://localhost:4222', [ 'username' => 'nats', 'password' => 'password', 'debug' => true ] ); // Simple publisher $nats->publish('foo', 'Hello World'); // Simple asynchronous subscriber $nats->subscribe('foo', function($message) { printf("\nReceived a …Read more
The same vendor provides 44 package(s).