PHP code example of stream-lib / rabbitmq-super-stream-legacy
1. Go to this page and download the library: Download stream-lib/rabbitmq-super-stream-legacy library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stream-lib / rabbitmq-super-stream-legacy example snippets
use StreamLib\RabbitMqSuperStream\SuperStreamClient;
$client = new SuperStreamClient(array(
'host' => 'rabbitmq',
'port' => 5552,
'username' => 'guest',
'password' => 'guest',
'vhost' => '/',
'super_stream' => 'orders',
));
$result = $client->publish(
json_encode(array('order_id' => 123)),
'customer-123',
'msg-123',
array(),
'application/json'
);