# Coordination

### Offset Commit

K2K keeps track of progress by periodically committing offsets indicating the last offset it replicated. Rather than using the Consumer Group API to commit offsets, K2K utilizes instead a control topic in the target cluster to write and store this information.

Bellow, it's a table of the configuration options that allow tweaking this process.

<table><thead><tr><th width="301.41668701171875">Property Path</th><th>Description</th><th width="245.5">Default</th><th>Required</th></tr></thead><tbody><tr><td><code>coordination.commit.topic</code></td><td>Control topic that holds the commit information.</td><td><pre><code>__k2k_consumer-offsets
</code></pre></td><td>No</td></tr><tr><td><code>coordination.commit.syncTimeout</code></td><td>Max amount of time K2K will spend attempting to read the contents of the offset commit control topic</td><td>30 seconds</td><td>No</td></tr><tr><td><code>coordination.commit.batchSize</code></td><td>Max number of records produced before a commit message is also produced.</td><td>1000</td><td>No</td></tr><tr><td><code>coordination.commit.batchTimeout</code></td><td>Max amount of time between commit messages are produced.</td><td>2 seconds</td><td>No</td></tr></tbody></table>

### Exclusive Assignment

When `features.exactlyOnce` is used, K2K needs to make sure that at any given time, not more than one Producer is producing data for the same Source Topic Partition.\
Due to the lack of support for inter-cluster transactions, K2K has a custom strategy in order to guarantee the aforementioned invariant holds.

Bellow, it's a table of the configuration options that allow tweaking this process.

<table><thead><tr><th width="277.83331298828125">Property Path</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>coordination.assignment.topic</code></td><td>Control topic where K2K instances will publish information about which partitions they are using.</td><td><pre><code>__k2k_assignment
</code></pre></td><td>No</td></tr><tr><td><code>coordination.assignment.graceWindow</code></td><td>Max amount of time an instance will wait before fencing a producer that owns a partition the current instance was assigned.</td><td><code>15 seconds</code></td><td>No</td></tr><tr><td><code>coordination.assignment.fencingMaxParallelism</code></td><td>Controls how many producers can be fenced in parallel .</td><td><code>5</code></td><td>No</td></tr></tbody></table>
