  Let $\{\xi_1,\xi_2,\ldots\}$ be a sequence of independent random variables,
and $\eta$ be a counting random variable independent of this sequence. In
addition, let $S_0:=0$ and $S_n:=\xi_1+\xi_2+\cdots+\xi_n$ for $n\geqslant1$.
We consider conditions for random variables $\{\xi_1,\xi_2,\ldots\}$ and $\eta$
under which the distribution functions of the random maximum
$\xi_{(\eta)}:=\max\{0,\xi_1,\xi_2,\ldots,\xi_{\eta}\}$ and of the random
maximum of sums $S_{(\eta)}:=\max\{S_0,S_1,S_2,\ldots,S_{\eta}\}$ belong to the
class of consistently varying distributions. In our consideration the random
variables $\{\xi_1,\xi_2,\ldots\}$ are not necessarily identically distributed.
