Publish a message to the exchange represented by the AMQPExchange object.
public publish ( string $message, string $routing_key = null, integer $flags = AMQP_NOPARAM, array $attributes = [] ) : boolean | ||
$message | string | The message to publish. |
$routing_key | string | The optional routing key to which to publish to. |
$flags | integer | One or more of AMQP_MANDATORY and AMQP_IMMEDIATE. |
$attributes | array | One of content_type, content_encoding, message_id, user_id, app_id, delivery_mode, priority, timestamp, expiration, type or reply_to, headers. |
return | boolean | TRUE on success or FALSE on failure. |