Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current state: Under discussion

Discussion thread: TODO here

JIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-10000

...

And a single per-connector configuration property will be added:

NameTypeDefaultImportanceDoc
atomic.source.offset.commitBOOLEANfalseLOW

Whether to commit offsets for this connector's source tasks in a producer transaction with the records produced by those tasks. For some source connectors, this is all that is required for exactly-once delivery.

Will only apply in distributed mode; if used in a connector configuration on a standalone worker, will be ignored.

Proposed Changes

New source offset read behavior

...

Before enabling atomic source offset commit for a connector, its producer principal must be given the following permissions on the Kafka cluster it writes to:

OperationResource TypeResource Name
WriteTransactionalId${connector}-${taskId}, for each task that the connector will create, where ${connector} is the name of the connector and ${taskId} is the ID of the task (starting from zero). A prefix of ${connector}- can be used for convenience if there is no risk of conflict with other transaction IDs or if conflicts are acceptable to the user.
IdempotentWriteClusterKafka cluster targeted by the Connect cluster
WriteTopicInternal offsets topic used by the Connect cluster

Rolling upgrade

Once the necessary permissions are granted to the producers of all source connectors on the cluster that will use atomic source offset commit, it should be possible to enable atomic source offset commit via a single rolling upgrade of the cluster. If enabling atomic source offset for the entire worker, atomic.source.offset.commit=true should configured on each worker before restart. If enabling for a specific set of connectors, atomic.source.offset.commit=true  can be configured for these connectors either before, during, or after the rolling upgrade; it makes little difference either way.

...