copy_message
Copy 1 to 20 Kafka messages by topic, partition, and offset to an existing destination topic or cluster, preserving key, value, and headers with provenance.
Instructions
Copy 1 to 20 existing messages in one call through items, each identified by topic, partition and offset, to an existing topic on this or another configured cluster. Preserves key, value and headers and adds traceable provenance headers. Copying one message is an items array of length one.
No message is written unless confirm is true; one confirm covers the whole batch, and writing is not atomic because Kafka cannot retract a record produced before a later item failed. Results follow items order, each carrying index with result or error.
The destination must be writable and requires Kafka write permission; a read-only cluster may still be the source.
A key or value carrying a Schema Registry id is copied byte for byte. When the destination cluster uses a different registry the id may mean nothing there, so the response warns; set translate_schema to register the schema in the destination registry and rewrite the id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The copies to make, 1 to 20 of them. Copying one message is an array of length one. Two items naming the same source and destination are refused before anything is written. | |
| confirm | No | Optional. When false or omitted, nothing is written and the response shows the messages that would be copied. Must be true to actually write them. One confirm covers the whole batch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atomic | Yes | ||
| failed | Yes | ||
| applied | Yes | ||
| results | Yes | ||
| succeeded | Yes |