private function assertClient(ClientInterface $client)
    {
        if ($client->getConnection() instanceof AggregateConnectionInterface) {
            throw new NotSupportedException(
                'Cannot initialize a monitor consumer over aggregate connections.'
            );
        }

        if ($client->getCommandFactory()->supportsCommand('MONITOR') === false) {
            throw new NotSupportedException("'MONITOR' is not supported by the current command factory.");
        }
    }