downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

AMQPExchange::delete> <AMQPExchange::__construct
[edit] Last updated: Fri, 17 May 2013

view this page in

AMQPExchange::declare

(PECL amqp >= Unknown)

AMQPExchange::declareDeclarar un nuevo intercambio en el corredor

Descripción

public int AMQPExchange::declare ( void )

Declarar un intercambio en el corredor.

Parámetros

Valores devueltos

Devuelve TRUE en caso de éxito o FALSE en caso de error.

Errores/Excepciones

Lanza una AMQPExchangeException en caso de error.

Lanza una AMQPChannelException si el canal no está abierto.

Lanza una AMQPConnectionException si se perdió la conexión con el corredor.

Ejemplos

Ejemplo #1 Ejemplo de AMQPExchange::declare()

<?php

/* Crear una nueva conexión */
$cnn = new AMQPConnection();
$cnn->connect();

$ch = new AMQPChannel($cnn);

$ex = new AMQPExchange($ch);
$ex->setName('new_topic_exchange');
$ex->setType(AMQP_EX_TYPE_DIRECT);
$ex->setFlags(AMQP_DURABLE AMQP_AUTODELETE);
$ex->declare();

?>



add a note add a note User Contributed Notes AMQPExchange::declare - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites