> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/k2k/1.2/configuration/coordination.md).

# Coordination

Customize the behavior of the commit and exclusive assignment processes.

### 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lenses.io/latest/k2k/1.2/configuration/coordination.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
