  We study the online maximum matching problem in a model in which the edges
are associated with a known recourse parameter $k$. An online algorithm for
this problem has to maintain a valid matching while edges of the underlying
graph are presented one after the other. At any moment the algorithm can decide
to include an edge into the matching or to exclude it, under the restriction
that at most $k$ such actions per edge take place, where $k$ is typically a
small constant. This problem was introduced and studied in the context of
general online packing problems with recourse by Avitabile et al. [Information
Processing Letters, 2013], whereas the special case $k=2$ was studied by Boyar
et al. [WADS 2017].
  In the first part of this paper we consider the edge arrival model, in which
an arriving edge never disappears from the graph. Here, we first show an
improved analysis on the performance of the algorithm AMP of Avitabile et al.,
by exploiting the structure of the matching problem. In addition, we show that
the greedy algorithm has competitive ratio $3/2$ for every even $k$ and ratio
$2$ for every odd $k$. Moreover, we present and analyze an improvement of the
greedy algorithm which we call $L$-Greedy, and we show that for small values of
$k$ it outperforms the algorithm AMP. In terms of lower bounds, we show that no
deterministic algorithm better than $1+1/(k-1)$ exists, improving upon the
known lower bound of $1+1/k$.
  The second part of the paper is devoted to the edge arrival/departure model,
which is the fully dynamic variant of online matching with recourse. The
analysis of $L$-Greedy and AMP carry through in this model; moreover we show a
lower bound of $(k^2-3k+6) / (k^2-4k+7)$ for all even $k \ge 4$. For
$k\in\{2,3\}$, the competitive ratio is $3/2$.
