Bug Days
Developer guide

How to Replay Kafka Messages to Another Topic or Cluster

Copy a Kafka record or bounded offset range to the same or another cluster, preserving key, value, headers, and partition order where possible.

7 minute read Kafka message replay
Kafka message replay form selecting a source offset range and destination topic

Replaying is a write to a destination topic. Decide exactly which source records and destination you want before starting: source topic, partition, inclusive start offset, exclusive end offset, destination topic, and partition policy.

Try one record first

In the Kafka message browser, open the source record, inspect its key, value, and headers, then set the replay range to that offset and the following one. For example, offset 9310 becomes 9310 through 9311. The client can send it unchanged or use the single-record editor to alter UTF-8 key, value, and headers.

A null value is a tombstone in a compacted topic; an empty byte string is different. The JSON download retains Base64 bytes and nulls so you can verify what was sent.

Copy a bounded range

Use an exclusive end offset and confirm the destination topic. The client processes the selected partition in batches, preserving the order within that partition. It waits for broker delivery of each record and shows a running count. You can stop after the current batch. For a large range, keep the browser tab open until it finishes.

Choose Keep source partition only when the destination has that partition. Route by key lets Kafka choose a destination partition from the key. Choose partition sends every selected record to the same destination partition. Those policies can change ordering across partitions; order is meaningful within a partition, not across an entire topic.

Replay across clusters

Select Another cluster and enter its bootstrap servers and authentication. Holy CORS connects to both from your computer and keeps credentials in its local process for the session. The shared report never carries broker URLs, SASL secrets, or private keys.

A delivered write can still be repeated if you retry after a browser or network interruption. The producer uses idempotent delivery within its session, but a new replay session is not an exactly-once transfer. Check destination offsets and keys before retrying a partially completed range.

Continue reading