Advertisement
mikjaer

Untitled

Jan 16th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. #!/usr/bin/php
  2. <?php
  3. require_once __DIR__ . '/vendor/autoload.php';
  4. use PhpAmqpLib\Connection\AMQPStreamConnection;
  5. use PhpAmqpLib\Message\AMQPMessage;
  6.  
  7.  
  8. $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
  9. $channel = $connection->channel();
  10.  
  11. $channel->queue_declare('hello', false, false, false, false);
  12. print_r($channel->basic_get('hello', true));
  13.  
  14. $channel->close();
  15. $connection->close();
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement