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

Alvaro Videla videlalvaro at gmail.com
Tue Feb 25 19:55:53 GMT 2014


Hi,

You need to turn off debug mode for the library:
https://github.com/videlalvaro/php-amqplib#debugging

Regards,

Alvaro

On Tue, Feb 25, 2014 at 8:30 PM, anate <ambatinr at hotmail.com> wrote:
> 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:
> -------------------
>
> <?php
>
> 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');
>
> $channel->close();
> $connection->close();
> 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.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list