Merge branch '1.9.1' into devel
Conflicts: airtime_mvc/library/php-amqplib/demo/amqp_publisher.php
This commit is contained in:
commit
386e966080
4 changed files with 73 additions and 19 deletions
|
@ -14,7 +14,7 @@ $PORT = 5672;
|
|||
$USER = 'guest';
|
||||
$PASS = 'guest';
|
||||
$VHOST = '/';
|
||||
$EXCHANGE = 'router';
|
||||
$EXCHANGE = 'airtime-schedule';
|
||||
$QUEUE = 'msgs';
|
||||
$CONSUMER_TAG = 'consumer';
|
||||
|
||||
|
@ -23,7 +23,7 @@ $ch = $conn->channel();
|
|||
$ch->access_request($VHOST, false, false, true, true);
|
||||
|
||||
$ch->queue_declare($QUEUE);
|
||||
$ch->exchange_declare($EXCHANGE, 'direct', false, false, false);
|
||||
$ch->exchange_declare($EXCHANGE, 'direct', false, true);
|
||||
$ch->queue_bind($QUEUE, $EXCHANGE);
|
||||
|
||||
function process_message($msg) {
|
||||
|
|
|
@ -13,7 +13,8 @@ $PORT = 5672;
|
|||
$USER = 'guest';
|
||||
$PASS = 'guest';
|
||||
$VHOST = '/';
|
||||
$EXCHANGE = 'airtime-pypo';
|
||||
$EXCHANGE = 'airtime-schedule';
|
||||
|
||||
$QUEUE = 'msgs';
|
||||
|
||||
$conn = new AMQPConnection($HOST, $PORT, $USER, $PASS);
|
||||
|
@ -30,4 +31,5 @@ $ch->basic_publish($msg, $EXCHANGE);
|
|||
echo "Sent message '".$msg_body."'\n";
|
||||
$ch->close();
|
||||
$conn->close();
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue