/** * @param mixed $message * @param string $routingKey * @param int $flags * @param array $attributes * * @return bool */ public function publish($message, $routingKey = null, $flags = Client::NOPARAM, array $attributes = []) { try { return $this->rawExchange->publish($this->encodeStrategy->encode($message), $routingKey, $flags, $attributes); } catch (\Exception $e) { ClientHelper::throwRightException($e); } }
/** * @inheritDoc */ public function init() { parent::init(); $this->body = $this->decodeStrategy ? $this->decodeStrategy->decode($this->body) : $this->body; }