public function publish(Message $message)
    {
        if (!$this->isConnected) {
            return new RejectedPromise(new \LogicException('The client is not connected.'));
        }

        return $this->startFlow(new OutgoingPublishFlow($message, $this->identifierGenerator));
    }
public function publish(Message $message)
    {
        if (!$this->isConnected) {
            return new RejectedPromise(new \LogicException('The client is not connected.'));
        }

        return $this->startFlow(new OutgoingPublishFlow($message, $this->identifierGenerator));
    }
public function publish ( Message $ message ) { if ( ! $ this -> isConnected ) { return new RejectedPromise ( new \ LogicException ( 'The client is not connected.' ) ) ; } return $ this -> startFlow ( new OutgoingPublishFlow ( $ message , $ this -> identifierGenerator ) ) ; }
Publishes a message.

@param Message $message

@return ExtendedPromiseInterface
Publishes a message .