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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gwijaya at gmail dot com
New email:
PHP Version: OS:

 

 [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: Tue Apr 16 23:01:30 2024 UTC