public static function createSubscriptionFromSubscribeMessage(Session $session, SubscribeMessage $msg)
    {
        $options      = $msg->getOptions();
        $subscription = new Subscription($msg->getTopicName(), $session, $options);

        if (isset($options->disclose_publisher) && $options->disclose_publisher === true) {
            $subscription->setDisclosePublisher(true);
        }

        return $subscription;
    }