If a primary Kafka cluster is temporarily unavailable, you can
migrate mission-critical workloads to a secondary Kafka cluster (failover). When the primary
cluster is restored, you can migrate back (failback). The steps for migrating consumers in a
failover or failback scenario are identical. However, depending on the scenario, your source
and target clusters will be different. During failover you migrate consumers from primary to
secondary, while during failback you migrate consumers from secondary to primary.
Make sure that the clusters that you are migrating consumers between are set up with
bidirectional replication.
Verify that all mission critical consumer groups and topics, including the ones on the
secondary cluster are whitelisted.
The steps you need to take differ depending on whether automatic group offset
synchronization is enabled. Check SRM's configuration to see if the feature is enabled.
For more information, see Configuring automatic group offset
synchronization
Migrate consumer group offsets.
If automatic group offset
synchronization is disabled follow the steps provided under Manual migration. If automatic
group offset synchronization is enabled, follow the steps under Automatic migration.
If automatic group offset synchronization is
enabled, the translated offsets of the source cluster are already applied on the
target cluster. Continue with Step 2.
Start consumers on the target cluster.
Consumers automatically resume processing messages on the target cluster where they left
off on the source cluster.