CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
53
airtime_mvc/library/php-amqplib/amqp_test.php
Normal file
53
airtime_mvc/library/php-amqplib/amqp_test.php
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
//AMQP PHP library test
|
||||
|
||||
require_once('amqp.inc');
|
||||
|
||||
$EXCHANGE = 'test';
|
||||
$BROKER_HOST = 'localhost';
|
||||
$BROKER_PORT = 5672;
|
||||
$QUEUE = 'myqueue';
|
||||
$USER ='guest';
|
||||
$PASSWORD ='guest';
|
||||
|
||||
$msg_body = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
echo "Creating connection\n";
|
||||
$conn = new AMQPConnection($BROKER_HOST, $BROKER_PORT,
|
||||
$USER,
|
||||
$PASSWORD);
|
||||
|
||||
echo "Getting channel\n";
|
||||
$ch = $conn->channel();
|
||||
echo "Requesting access\n";
|
||||
$ch->access_request('/data', false, false, true, true);
|
||||
|
||||
echo "Declaring exchange\n";
|
||||
$ch->exchange_declare($EXCHANGE, 'direct', false, false, false);
|
||||
|
||||
//echo "Declaring queue\n";
|
||||
//$ch->queue_declare($QUEUE);
|
||||
|
||||
//echo "Binding queue to exchange\n";
|
||||
//$ch->queue_bind($QUEUE, $EXCHANGE);
|
||||
|
||||
echo "Creating message\n";
|
||||
$msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain'));
|
||||
|
||||
echo "Publishing message\n";
|
||||
$ch->basic_publish($msg, $EXCHANGE, $QUEUE);
|
||||
//$ch->basic_publish($msg, $EXCHANGE);
|
||||
|
||||
echo "Closing channel\n";
|
||||
$ch->close();
|
||||
echo "Closing connection\n";
|
||||
$conn->close();
|
||||
echo "Done.\n";
|
||||
} catch (Exception $e) {
|
||||
echo 'Caught exception: ', $e->getMessage();
|
||||
echo "\nTrace:\n" . $e->getTraceAsString();
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue