Skip to main content

Manage Kafka MM2 sources

Use Kafka MM2 (MirrorMaker 2) to move topics and their consumers from another Kafka cluster to your CDC Service, so that consumers continue where they left off. To copy the topic data only, use the Kafka source connector instead.

Prerequisites​

  • A CDC Service whose status is Healthy. See Create a CDC Service.
  • The bootstrap server endpoints, security protocol, and credentials of the Kafka cluster to replicate from, or a Kafka cluster in FPT Database Engine and the username and password of its Kafka user.

Create a Kafka MM2 source​

  1. Select Data platform → Workspace management, then select your workspace.

  2. On the Overview tab, under Services, select the CDC card.

  3. Select the Kafka MM2 tab, then select Create Kafka MM2.

    Kafka MM2 tab of a CDC Service with no Kafka MM2 yet and the Create Kafka MM2 button

  4. On the Connector Information screen, enter a Name and select source in Type.

    Connector Information screen of the Create Kafka MM2 form with the Name and Type fields

  5. Select Next Step. On the Properties screen, enter the details of the Kafka cluster, then select Test connection. Next Step stays disabled until the test succeeds.

    Kafka Cluster Information section with From FPT Database Engine selected and the Database Name, Cluster alias name, Bootstrap Server Endpoint, and Security Protocol fields

  6. In Topics, add the topics to replicate. The + buttons of Topics and Kafka Group are available after the test succeeds.

    Topics section with the add and clear buttons, the Filter box, and one topic in the list

  7. In Kafka Group, add the consumer groups to replicate.

    Kafka Group section with the add and clear buttons, the Filter box, and one consumer group in the list

  8. Select Next Step. On the Additional properties screen, set the task and replication options.

    Additional properties screen of the Create Kafka MM2 form with the Number of tasks, Replication policy, Replication factor, and Offset lag max fields

  9. Select Next Step and check the settings on the Review screen.

    Review screen of the Create Kafka MM2 form with the basic information, Kafka cluster information, task, and replication settings

  10. Select Create.

The new Kafka MM2 source appears on the Kafka MM2 tab with its State, for example Running.

Connector information​

FieldDescription
NameRequired. Lowercase letters (a-z), numbers (0-9), and hyphens (-) only. Upper-case letters, _, ., and spaces are rejected.
TypeRequired. source is the only option.

Properties​

FieldDescription
From FPT Database Engine or Manual configurationHow to reach the Kafka cluster. From FPT Database Engine is selected by default. Switching keeps the values you entered. See Connection mode.
Database NameWith From FPT Database Engine only. The Kafka cluster to replicate from. Selecting it fills in Bootstrap Server Endpoint, Security Protocol, and Authentication method. The list also shows the Kafka cluster of your CDC Service, so check that you select another cluster.
Cluster alias nameRequired. The identifier of the cluster. Letters, numbers, and hyphens (-) only.
Bootstrap Server EndpointRequired. The Kafka server endpoints. Separate several endpoints with commas (,).
Security ProtocolRequired. The security protocol of the cluster: PLAINTEXT, SSL, SASL_PLAINTEXT, or SASL_SSL.
Authentication methodWith SASL_PLAINTEXT or SASL_SSL. The SASL mechanism: PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512.
UsernameRequired with SASL_PLAINTEXT or SASL_SSL. The user that connects to the cluster.
PasswordRequired with SASL_PLAINTEXT or SASL_SSL. The password of that user.
TopicsRequired. The topics to replicate from the cluster. Select + to add topics, × to clear the list, and the delete icon to remove one topic. See Topics.
Kafka GroupRequired. The consumer groups whose offsets Kafka MM2 copies to the CDC Service cluster, so that these consumers can continue there from the same position. They are listed under Selected groups with a Total group count. The section has the same controls as Topics.

Test connection checks the connection from the workspace to the cluster you entered and reads its topics. If it fails with "No topics found, please check the Kafka cluster input", check the endpoints, the credentials, and the authentication method, and check that the cluster has at least one topic.

Additional properties​

FieldDescription
Number of tasksThe maximum number of tasks that run in parallel, usually no more than the number of Kafka partitions. See Tasks max.
Replication policyHow to name the copied topics in the CDC Service cluster. Default Replication Policy names each topic CLUSTER_ALIAS.TOPIC, for example alias-name.topic-name. Identity Replication Policy keeps the original topic names, which suits a one-way copy such as a migration.
Replication factorThe number of replicas of each copied topic in the CDC Service cluster. -1 uses the default replication factor of that cluster.
Offset lag maxThe maximum offset lag between the source and the target.

Edit a Kafka MM2 source​

You can change the Kafka cluster connection, the number of tasks, and the replication settings of a Kafka MM2 source.

Open the Kafka MM2 details​

  1. Select Data platform → Workspace management, then select your workspace.
  2. On the Overview tab, under Services, select the CDC card.
  3. Select the Kafka MM2 tab, then select the name of the Kafka MM2 source.

Kafka MM2 details page with the Basic Information, Kafka Cluster Information, Task, and Replication sections and their edit icons

The details page shows the Status and four sections: Basic Information, Kafka Cluster Information, Task, and Replication. The last three have an edit icon. In Kafka Cluster Information, Security Protocol is the protocol, for example SASL_PLAINTEXT, and Authentication method is the SASL mechanism, for example PLAIN.

Update the Kafka cluster connection​

  1. In Kafka Cluster Information, select the edit icon.
  2. In the Update Database Info panel, change the Bootstrap Server Endpoint, Security Protocol, Authentication method, Username, or Password.
  3. Select Test connection.
  4. Select Save after the test succeeds.

Update Database Info panel with the Bootstrap Server Endpoint, Security Protocol, Authentication method, Username, and Password fields and the Test connection button

Change the number of tasks​

  1. In Task, select the edit icon.
  2. In the Update Number of Tasks panel, enter the Number of task.
  3. Select Save.

Update Number of Tasks panel with the Number of task field

Change the replication settings​

  1. In Replication, select the edit icon.
  2. In the Update Replication panel, change the Replication policy, Replication factor, or Offset lag max.
  3. Select Save.

Update Replication panel with the Replication policy, Replication factor, and Offset lag max fields

To close a panel without saving, select Cancel.

Delete a Kafka MM2 source​

  1. Select Data platform → Workspace management, then select your workspace.

  2. On the Overview tab, under Services, select the CDC card.

  3. Select the Kafka MM2 tab.

  4. In the row of the Kafka MM2 source, select the more icon (⋮), then select Delete.

    Kafka MM2 tab with the Delete option open in the row of a running Kafka MM2 source

  5. In the Delete Kafka MM2 dialog, enter delete, then select Confirm.

    Delete Kafka MM2 dialog with delete entered in the confirmation box and the Confirm button

You can also start from the details page: select Actions → Delete, then continue with step 5.

danger

Deleting a Kafka MM2 source cannot be undone.

The topics that Kafka MM2 already copied stay in the Kafka cluster of the CDC Service.

Next steps​