Skip to content

KAFKA-20430 Add configuration to control internal topic creation in Kafka Connect - #20384

Merged
chia7712 merged 19 commits into
apache:trunkfrom
anton-liauchuk:internal_topics_creation
Jul 29, 2026
Merged

KAFKA-20430 Add configuration to control internal topic creation in Kafka Connect#20384
chia7712 merged 19 commits into
apache:trunkfrom
anton-liauchuk:internal_topics_creation

Conversation

@anton-liauchuk

@anton-liauchuk anton-liauchuk commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added triage PRs from the community connect small Small PRs labels Aug 20, 2025
@anton-liauchuk

Copy link
Copy Markdown
Contributor Author

@C0urante, @mimaison, @chia7712 could you take a look at this POC?

@mimaison

Copy link
Copy Markdown
Member

Hi @anton-liauchuk,

Your PoC introduces a new configuration so it requires a KIP. See https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals for details about the process.

@anton-liauchuk

Copy link
Copy Markdown
Contributor Author

Hi @anton-liauchuk,

Your PoC introduces a new configuration so it requires a KIP. See https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals for details about the process.

hi @mimaison
thank you! I will be working on the KIP

@anton-liauchuk

Copy link
Copy Markdown
Contributor Author

@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added stale Stale PRs and removed needs-attention stale Stale PRs labels Dec 13, 2025
@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@hgeraldino

Copy link
Copy Markdown
Contributor

looks good

@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Comment thread connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfig.java Outdated
Comment thread tools/src/main/java/org/apache/kafka/tools/ConnectInternalTopics.java Outdated
@github-actions github-actions Bot removed needs-attention triage PRs from the community labels Jun 6, 2026

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch, some comments left

Comment thread tools/src/main/java/org/apache/kafka/tools/ConnectInternalTopics.java Outdated
@anton-liauchuk
anton-liauchuk requested a review from m1a2st July 27, 2026 08:34

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-liauchuk thanks for this patch. Please update upgrade.md as well

@anton-liauchuk

Copy link
Copy Markdown
Contributor Author

@anton-liauchuk thanks for this patch. Please update upgrade.md as well

@chia7712
Added a note to the Notable changes in 4.4.0 section, thanks!

…tion

# Conflicts:
#	docs/getting-started/upgrade.md
@anton-liauchuk
anton-liauchuk requested a review from chia7712 July 28, 2026 09:58
log.debug("Skipping creation of Connect internal topic for {} because automatic topic creation is disabled", getTopicPurpose());
Map<String, TopicDescription> existing = admin.describeTopics(topic);
if (existing.isEmpty()) {
String msg = String.format("Topic '%s' specified via the '%s' property is missing." +

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this error message correct if it's a connector-specific offset topic? Also, what getTopicConfig() returns wouldn't be the correct config key in that case, right?

* Brokers can now record a human-readable description of each streams group's processing topology via a pluggable backend, retrievable through `Admin#describeStreamsGroups` and `kafka-streams-groups.sh --describe --topology`. The feature is disabled unless the new broker configuration `group.streams.topology.description.plugin.class` is set to a `StreamsGroupTopologyDescriptionPlugin` implementation; on the client side, the new Kafka Streams configuration `topology.description.push.enabled` (default `true`) controls whether the client pushes topology descriptions when requested. This adds a new RPC, `StreamsGroupTopologyDescriptionUpdate`, bumps `StreamsGroupDescribe` and `StreamsGroupHeartbeat` to version 1, and introduces the error codes `GROUP_DELETION_FAILED` (134) and `STREAMS_TOPOLOGY_DESCRIPTION_UPDATE_FAILED` (135). `DeleteGroups` is bumped to version 3, adding a per-group `ErrorMessage` field so brokers can report why a group deletion failed (for example, when the plugin fails to delete its stored topology description, the group is not deleted and `GROUP_DELETION_FAILED` is returned; retrying the deletion is safe). For further details, please refer to [KIP-1331](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1331%3A+Streams+Group+Topology+Description+Plugin) and the [Topology Description Plugin](/{version}/streams/developer-guide/topology-description-plugin/) documentation.
* The `kafka-producer-perf-test.sh` tool now supports `--record-key-range`, `--key-distribution`, and `--random-seed` options to control the distribution of record keys. Use `--key-distribution range` for sequential key assignment (round-robin over the key range) or `--key-distribution random` for random key selection. The `--random-seed` option allows reproducible benchmark runs when using random key distribution. For further details, please refer to [KIP-1299](https://cwiki.apache.org/confluence/x/XpQ8G).
* Share groups now support dead-letter queue functionality as outlined in [KIP-1191](https://cwiki.apache.org/confluence/x/fApJFg). Any records which are released (beyond max delivery count) or rejected by the share consumer become eligible for DLQ. Share group DLQ gets enabled when the Kafka feature `share.version` is upgraded to 2. The user can configure a DLQ topic on a share group by setting the dynamic config `errors.deadletterqueue.topic.name` (default `""`) to the name of the DLQ topic. The cluster can be configured to auto create the DLQ topics by setting the dynamic cluster config `errors.deadletterqueue.auto.create.topics.enable` to `true` (default `false`). If auto create is not enabled, the user must create the DLQ topic like a standard Kafka topic and set the dynamic config `errors.deadletterqueue.group.enable` to `true` on the DLQ topic. The DLQ topic name must be prefixed by the value set in the dynamic cluster config `errors.deadletterqueue.topic.name.prefix` (default `dlq.`). The records sent to the DLQ topic by default only contain source record metadata like group, topic name, partition id, offset and delivery count. If original record data is also required, the user must set the dynamic config `errors.deadletterqueue.copy.record.enable` to `true` on the share group.
* Kafka Connect distributed workers now support the `internal.topics.automatic.creation.enable` configuration (default: `true`). When set to `false`, Connect will not automatically create internal topics (offset, config, status, and connector-specific offset topics) and will instead fail at startup if any of these topics are missing. A new `connect-internal-topics.sh` tool is also available for manually creating these topics. For further details, please refer to [KIP-1209](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1209:+Add+configuration+to+control+internal+topic+creation+in+Kafka+Connect).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use immutable KIP link https://cwiki.apache.org/confluence/x/GAq2Fg

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and we will create the patch to fix the remaining tiny issues

@chia7712
chia7712 merged commit b992620 into apache:trunk Jul 29, 2026
24 checks passed
@anton-liauchuk

Copy link
Copy Markdown
Contributor Author

LGTM and we will create the patch to fix the remaining tiny issues

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants