// Module included in the following assemblies:
// assembly-management-tasks.adoc

[id='proc-manual-restart-mirrormaker2-connector-{context}']
= Manually restarting MirrorMaker 2 connectors

[role="_abstract"]
Use the `strimzi.io/restart-connector` annotation to manually trigger a restart of a MirrorMaker 2 connector.

.Prerequisites

* The Cluster Operator is running.

.Procedure

. Find the name of the `KafkaMirrorMaker2` custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
+
[source,shell,subs="+quotes"]
----
kubectl get KafkaMirrorMaker2
----

. Find the name of the Kafka MirrorMaker 2 connector to be restarted from the `KafkaMirrorMaker2` custom resource:
+
[source,shell,subs="+quotes"]
----
kubectl describe KafkaMirrorMaker2 <mirrormaker_cluster_name>
----

. Use the name of the connector to restart the connector by annotating the `KafkaMirrorMaker2` resource in Kubernetes:
+
[source,shell,subs="+quotes"]
----
kubectl annotate KafkaMirrorMaker2 <mirrormaker_cluster_name> "strimzi.io/restart-connector=<mirrormaker_connector_name>"
----
+
In this example, connector `my-connector` in the `my-mirror-maker-2` cluster is restarted:
+
[source,shell,subs="+quotes"]
----
kubectl annotate KafkaMirrorMaker2 my-mirror-maker-2 "strimzi.io/restart-connector=my-connector"
----

. Wait for the next reconciliation to occur (every two minutes by default).
+
The MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
When MirrorMaker 2 accepts the request, the annotation is removed from the `KafkaMirrorMaker2` custom resource.
