person-carry-boxExactly Once Delivery

Enable exactly once delivery guarantees.

circle-exclamation

K2K uses at-least-once delivery by default, but it can be configured for exactly-once delivery. This tutorial will guide you on how to enable exactly-once delivery.

This tutorial assumes the following files exist (See Setting up for more details):

name: "my-first-replication"
features:
  autoCreateControlTopics: enabled
  autoCreateTopics: enabled
source:
  kafka:
    common:
      "bootstrap.servers": "kafka-source:9092"
    consumer:
      "group.id": "k2k.my-first-k2k"
target:
  kafka:
    common:
      "bootstrap.servers": "kafka-target:9092"
replication:
  - source:
      topic: ".*"
  - sink:
      topic: source
      partition: source

To ensure a clean start, execute this command to reset any prior configurations from earlier tutorials.

Enabling Exactly Once

To achieve exactly-once semantics, enable that option and set the idempotent flag on the producer instance as follows:

chevron-rightk2k-pipeline.ymlhashtag
chevron-rightSee it in actionhashtag

Was this helpful?