php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61589 amqp example not worked
Submitted: 2012-04-01 07:00 UTC Modified: 2014-06-12 19:29 UTC
Votes:5
Avg. Score:2.8 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: gwijaya at gmail dot com Assigned:
Status: Wont fix Package: amqp (PECL)
PHP Version: Irrelevant OS: Ubuntu 10.04, PHP 5.3.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-04-01 07:00 UTC] gwijaya at gmail dot com
Description:
------------
http://php.net/manual/en/amqp.examples.php throw many error when using PECL AMQP 1.0.1. exchange declare, and queue declare should have 0 parameter, so we have to set parameters on the constructor

OS: Ubuntu 5.3.2
PHP: 5.3.2
AMQP: 1.0.1

Test script:
---------------
<?php
// Create a connection
$cnn = new AMQPConnection();
$cnn->connect();
// Create a channel
$ch = new AMQPChannel($cnn);
// Declare a new exchange
$ex = new AMQPExchange($ch);
$ex->declare('exchange1', AMQP_EX_TYPE_FANOUT);
// Create a new queue
$q = new AMQPQueue($ch);
$q->declare('queue1');
// Bind it on the exchange to routing.key
$ex->bind('queue1', 'routing.key');
// Publish a message to the exchange with a routing key
$ex->publish('message', 'routing.key');
// Read from the queue
$msg = $q->consume();



Patches

amqp_example.patch (last revision 2012-04-01 07:01 UTC by gwijaya at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-14 01:54 UTC] bkw at codingforce dot com
Thanks for reporting this.
Work is underway to update the documentation, but it might take some time, since 
there is bureaucracy involved. We'll update this ticket when we had a chance to 
update the exmaples.
 [2014-06-12 19:29 UTC] sobak@php.net
-Status: Open +Status: Wont fix
 [2014-06-12 19:29 UTC] sobak@php.net
AMQP manual was removed from php.net about month ago so we're not mantaining it anymore.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC