protected function registerPluginSubscribers(array $plugins)
    {
        $client = $this->getClient();
        foreach ($plugins as $plugin) {
            $this->validatePluginEvents($plugin);
            $callbacks = $plugin->getSubscribedEvents();
            foreach ($callbacks as $event => $callback) {
                $pluginCallback = [ $plugin, $callback ];
                if (is_callable($pluginCallback)) {
                    $callback = $pluginCallback;
                }
                $client->on($event, $callback);
            }
        }
    }