PHP Doku:: Declare a new exchange on the broker. - amqpexchange.declare.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteAMQPThe AMQPExchange classAMQPExchange::declare

Ein Service von Reinhard Neidl - Webprogrammierung.

The AMQPExchange class

<<AMQPExchange::__construct

AMQPExchange::delete>>

AMQPExchange::declare

(PECL amqp >= Unknown)

AMQPExchange::declareDeclare a new exchange on the broker.

Beschreibung

public void AMQPExchange::declare ([ string $exchange_name = "" [, string $exchange_type = AMQP_EX_TYPE_DIRECT [, string $flags = NULL ]]] )

Declare a new exchange on the broker with the given information. If an exchange by that name already exists and the exchange_type and/or flags are specified, the exchange settings will be updated.

If no exchange_type is specified and the exchange does not exist, the exchange type will default to "direct".

Parameter-Liste

exchange_name

The name of the exchange.

exchange_type

The type of the exchange. Can be any of AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_TOPIC or AMQP_EX_TYPE_HEADER.

flags

A bitmask of any of the flags: AMQP_PASSIVE, AMQP_DURABLE, AMQP_AUTODELETE.

Rückgabewerte

Beispiele

Beispiel #1 AMQPExchange::declare() example

<?php

/* Create a new connection */
$cnn = new AMQPConnection();
$cnn->connect();

$ex = new AMQPExchange($cnn);
$ex->declare('new_topic_exchange'AMQP_DURABLE AMQP_AUTODELETE);

?>


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)