Skip to content

Minor: Preserve user-provided acks config without mutation#21400

Open
anupamalok wants to merge 1 commit intoapache:trunkfrom
anupamalok:fix-acks-parse-validation
Open

Minor: Preserve user-provided acks config without mutation#21400
anupamalok wants to merge 1 commit intoapache:trunkfrom
anupamalok:fix-acks-parse-validation

Conversation

@anupamalok
Copy link

Problem
KafkaProducer currently normalize the acks configuration by rewriting the user-provided value "all" to "-1" in the configs map during initialisation. This mutates the user's original configuration even though both values are semantically equivalent.

Fix
Preserve the user-provided acks value in configs and only normalize it internally for protocol usage.

Tests
Added a regression test to ensure KafkaProducer does not mutate the user-provided acks configuration.

Note: I do not currently have access to create Kafka JIRA issues.

@github-actions github-actions bot added triage PRs from the community producer clients small Small PRs labels Feb 4, 2026
@anupamalok
Copy link
Author

anupamalok commented Feb 4, 2026

All tests passed locally and in CI.

@anupamalok anupamalok changed the title Preserve user-provided acks config without mutation Minor: Preserve user-provided acks config without mutation Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients producer small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant