For the complete documentation index, see llms.txt. This page is also available as Markdown.

Consumer group

Source consumer group for load distribution.

Kafka assigns each partition to one member of a consumer group. To read from multiple partitions in parallel and scale the replicator horizontally, K2K must join a group on the source Kafka cluster like any other consumer.

Set source.kafka.consumer."group.id" in the pipeline. All replicator instances running the same pipeline must share this value—the K2K group. Unlike application consumers, K2K does not commit offsets on the source Kafka cluster; it records replication progress in control topics on the target Kafka cluster instead. Customize the commit control topic in the Advanced section below, or see Horizontal scaling to add instances.

Prerequisites

Example

Use this pipeline configuration:

name: "my_pipeline"
source:
  kafka:
    common:
      "bootstrap.servers": "source:9092"
    consumer:
      "group.id": "my-k2k-group"
target:
  kafka:
    common:
      "bootstrap.servers": "target:9092"
replication:
  - source:
      topic: "orders.*"
  - sink:
      topic: source
      partition: source

Configuration keys

Key
Description
Required
Default
Used by

source.kafka.consumer."group.id"

K2K consumer group on the source Kafka cluster

Yes

(none)

Replicator

All replicator instances running the same pipeline must use the same group.id. This is the K2K group.

Advanced

Control topics

K2K records how far replication has progressed in a commit control topic on the target Kafka cluster. Each replicator instance reads this topic to recover its position after a restart.

Key
Description
Required
Default
Used by

coordination.commit.topic

Control topic for replication progress commits

No

__k2k_consumer-offsets

Replicator

For commit batching behaviour, see Commit tuning. For automatically creating this topic with custom settings, see Topic creation.

Last updated

Was this helpful?