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::declareDéclare un nouvel échange sur le broker

Description

public int AMQPExchange::declare ( void )

Déclare un nouvel échange sur le broker.

Liste de paramètres

Valeurs de retour

Cette fonction retourne TRUE en cas de succès ou FALSE si une erreur survient.

Erreurs / Exceptions

Lance une exception AMQPExchangeException en cas d'échec.

Lance une exception AMQPChannelException si le canal n'est pas ouvert.

Lance une exception AMQPConnectionException si la connexion avec le broker a été perdue.

Exemples

Exemple #1 Exemple avec AMQPExchange::declare()

<?php

/* Création d'une nouvelle connexion */
$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