PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

AMQPExchange::publish

(PECL amqp >= Unknown)

AMQPExchange::publishPublish a message to an exchange.

Description

public bool AMQPExchange::publish ( string $message , string $routing_key [, int $params = 0 [, array $attributes ]] )

Publish a message to the exchange represented by the AMQPExchange object.

Parameters

message

The message to publish.

routing_key

The routing key to which to publish.

params

One or more of AMQP_MANDATORY and AMQP_IMMEDIATE.

attributes

Supported indexes
key Description Default value
Content-type   text/plain
Content-encoding   NULL
message_id   NULL
user_id   NULL
app_id   NULL
delivery_mode   NULL
priority   NULL
timestamp   NULL
expiration   NULL
type   NULL
reply_to   NULL

Return Values

Returns TRUE on success or FALSE on failure.

Errors/Exceptions

Throws an AMQPExchangeException on failure.

PHP Manual