PHP code example of innmind / rabbitmq-management

1. Go to this page and download the library: Download innmind/rabbitmq-management 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/ */

    

innmind / rabbitmq-management example snippets


use Innmind\RabbitMQ\Management\{
    Status,
    Control,
};
use Innmind\OperatingSystem\Factory;

$os = Factory::build();
$status = Status::of(
    $os->control(),
    $os->clock(),
);
$status->users();
$status->vhosts();
$status->connections();
$status->exchanges();
$status->permissions();
$status->channels();
$status->consumers();
$status->queues();
$status->nodes();

$control = Control::of($server);
$control->users();
$control->vhosts();
$control->permissions();

use Innmind\RabbitMQ\Management\Status\Environment\Remote;
use Innmind\Url\{
    Authority\Host,
    Authority\Port,
    Path,
};

Status::of(
    $os->control(),
    $os->clock(),
    Remote::of(
        Host::of('your-host'),
        Port::of(1337),
        'username',
        'password',
        Path::of('/some-vhost'),
    ),
);