protected function processPublish(Session $session, PublishMessage $msg)
    {
        if ($msg->getPublicationId() === null) {
            $msg->setPublicationId(Utils::getUniqueId());
        }

        /** @var SubscriptionGroup $subscriptionGroup */
        foreach ($this->subscriptionGroups as $subscriptionGroup) {
            $subscriptionGroup->processPublish($session, $msg);
        }

        if ($msg->acknowledge()) {
            $session->sendMessage(new PublishedMessage($msg->getRequestId(), $msg->getPublicationId()));
        }
    }
protected function processPublish(Session $session, PublishMessage $msg)
    {
        if ($msg->getPublicationId() === null) {
            $msg->setPublicationId(Utils::getUniqueId());
        }

        /** @var SubscriptionGroup $subscriptionGroup */
        foreach ($this->subscriptionGroups as $subscriptionGroup) {
            $subscriptionGroup->processPublish($session, $msg);
        }

        if ($msg->acknowledge()) {
            $session->sendMessage(new PublishedMessage($msg->getRequestId(), $msg->getPublicationId()));
        }
    }
protected function processPublish ( Session $ session , PublishMessage $ msg ) { if ( $ msg -> getPublicationId ( ) === null ) { $ msg -> setPublicationId ( Utils :: getUniqueId ( ) ) ; } /** @var SubscriptionGroup $subscriptionGroup */ foreach ( $ this -> subscriptionGroups as $ subscriptionGroup ) { $ subscriptionGroup -> processPublish ( $ session , $ msg ) ; } if ( $ msg -> acknowledge ( ) ) { $ session -> sendMessage ( new PublishedMessage ( $ msg -> getRequestId ( ) , $ msg -> getPublicationId ( ) ) ) ; } }
Process publish message

@param \Thruway\Session $session
@param \Thruway\Message\PublishMessage $msg
Process publish message