[rabbitmq-discuss] php-amqplib Client publish to Queue and redirect to a new page

anate ambatinr at hotmail.com
Tue Feb 25 19:30:21 GMT 2014

I am using php-amqplib client library to publish the message to RabbitMQ. The
POST data after submit the page displays informational(warning) messages
after successfully queued the message. Instead I would like to redirect the
page to Redirect.php.  How can I turn off these messages and redirect to a
new page?Please suggest. Here are the messages I am getting. 

< [hex]: 0000 41 4D 51 50 00 00 09 01 AMQP.... waiting for 10,10 waiting for
a new frame > 10,10: Connection.start Start from server, version: 0.9,
properties: capabilities=(publisher_confirms=1,
exchange_exchange_bindings=1, basic.nack=1, consumer_cancel_notify=1,
connection.blocked=1, consumer_priorities=1,
authentication_failure_close=1), copyright=Copyright (C) 2007-2013
GoPivotal, Inc., information=Licensed under the MPL. See
http://www.rabbitmq.com/, platform=Erlang/OTP, product=RabbitMQ,
version=3.2.3, mechanisms.............

My code:


include(__DIR__ . '/config.php');
use PhpAmqpLib\Connection\AMQPConnection;
use PhpAmqpLib\Message\AMQPMessage;

$connection = new AMQPConnection('server-name', 5672, 'guest', 'guest');
$channel = $connection->channel();

$channel->queue_declare('hello-world-queue', false, false, false, false);

$message = 'Hello World';

$msg = new AMQPMessage($message);
$channel->basic_publish($msg, '', 'hello-world-queue');

header ("location:Redirect.php");  


View this message in context: http://rabbitmq.1065348.n5.nabble.com/php-amqplib-Client-publish-to-Queue-and-redirect-to-a-new-page-tp33652.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

More information about the rabbitmq-discuss mailing list