PHP Classes

File: example/Connecton.php

Recommend this page to a friend!
  Classes of MERAJ AHMAD SIDDIQUI   RabbitMQ Manager   example/Connecton.php   Download  
File: example/Connecton.php
Role: Example script
Content type: text/plain
Description: Example script
Class: RabbitMQ Manager
Manage exchanges, queues messages in RabbitMQ
Author: By
Last change:
Date: 7 years ago
Size: 550 bytes
 

Contents

Class file image Download
<?php


require dirname(__dir__) . "/vendor/autoload.php";

$configuration_file = dirname(__FILE__)."/config.json";
$configuration = json_decode(file_get_contents($configuration_file), true);

use
RabbitMQManager\Config;
use
RabbitMQManager\Connection;

/**
 * Set configuration of RabbitMQ connection
 */
Config::init($configuration);

/**
 * This will create an object of Connection to be used for operation on connection
 */
$connection = new Connection();

$all_open_connection = $connection->getConnectionList();
var_dump($all_open_connection);