Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2019 20:33
What would you like to do?
PHP and Example
require_once 'vendor/autoload.php';
// Yeni bağlantı nesnesi oluşturma ve bağlanma
$client = new \Nats\Connection();
// Subscriber
$callback = function($payload)
printf("Data: <strong>%s</strong>", $payload);
$sid = $client->subscribe("foo", $callback);
// Publisher
$client->publish('foo', 'Erhan Yakut');
// 1 mesaj gelene kadar bekletme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment