Browse documentation

Configure Kafka Topic Cloning

Select the Kafka topics you need, then use scope and range to control what reaches the target. A focused clone is faster to inspect and avoids copying unrelated production data.

Select the topics to clone

Choose a source cluster and select one or more topics. The format badge beside a topic shows when Kafma detects an Avro, JSON Schema, or Protobuf subject by topic name. A topic without a badge can still use RecordNameStrategy or TopicRecordNameStrategy.

Data Clone copies only the topics you select. It does not copy consumer groups or broker settings.

Choose structure, data, or both

ScopeWhat Kafma doesUse it when
Structure + DataCreates missing topics, syncs the latest TopicNameStrategy schemas, registers any additional versions used by the selected messages, and appends those messagesReproducing an issue or creating a working local copy
Structure onlyCreates missing topics and registers the latest discovered schemas, but copies no messagesYou want production-like structure for your own test data
Data onlyAppends messages to existing topics and skips missing topics; it does not create topics or register schemasThe target structure is managed elsewhere

With Structure only, TopicNameStrategy subjects sync without reading messages. Enable Sample messages for record-name schemas to discover RecordNameStrategy and TopicRecordNameStrategy subjects. Sampling only finds schemas; it does not copy messages.

Using Structure only with optional message sampling to discover record-name schemas

Clone the messages needed to reproduce an issue

The range applies to every selected topic:

RangeMessages selected
Latest 10k msgs / partitionUp to the newest 10,000 retained records from each partition
Time windowRecords at or after the start time and before the end time
Offset rangeRecords from the start offset through the end offset in each partition
All messagesEvery record the source currently retains

Selecting a message range while matching target topic names and partition counts

Message counts are per partition. On a topic with 20 partitions, Latest 10k msgs / partition can copy as many as 200,000 records.

For an incident, start with the narrowest time window that contains the failure. Use an offset range when you know the relevant partition positions. Choose All messages only for a small topic; Data Clone is designed for bounded debugging and test data, not full-cluster replication.

Understand per-partition ranges

Each partition has its own offsets. If you enter 100-200, Kafma looks for offsets 100 through 200 in every partition. A partition without those offsets contributes no messages.

A time window also resolves to a separate offset span in each partition. Kafma copies records from the selected interval and stops at the snapshot boundary; it does not continue following new messages.

Set target topic names

NamingResult
Match SourceKeep each source topic name
Add PrefixAdd one prefix to every selected topic
Add SuffixAdd one suffix to every selected topic

Keep the source names when an application on a separate target cluster expects them. Use a prefix or suffix to isolate test data or keep clones from different environments apart.

When source and target are the same cluster, Match Source is unavailable. Kafma defaults to the -copy suffix so the target cannot overlap the source topic.

Choose target partition counts

For a cross-cluster, non-production target, choose:

  • Match Source to create missing topics with the source partition count.
  • 1 Partition per topic when one partition is enough for local testing.

Match Source copies the partition count, not each record's source partition number. The target producer repartitions keyed records by key and assigns unkeyed records automatically. A record can therefore land on a different partition even when the source and target have the same partition count. Choosing one partition removes partition-level parallelism, but can simplify a local debugging setup.

If the target topic already exists, Kafma keeps its current partition count and configuration. Pre-flight reports a partition-count difference instead of modifying it.

Same-cluster and production safeguards

For a same-cluster clone, a prefix or suffix is mandatory. The source remains read-only, and the new records go to separate topic names.

When the target is marked as production, type its cluster name to confirm the write. Kafma hides the Partitions selector. New target topics use the source partition count; existing topics keep their current count.

Next steps