Skip to content

Improve linger/timeout validation error message with aliases#5314

Open
MXLange wants to merge 1 commit intoconfluentinc:masterfrom
MXLange:fix/linger-timeout-error-aliases
Open

Improve linger/timeout validation error message with aliases#5314
MXLange wants to merge 1 commit intoconfluentinc:masterfrom
MXLange:fix/linger-timeout-error-aliases

Conversation

@MXLange
Copy link

@MXLange MXLange commented Feb 16, 2026

Improves the producer configuration validation error message by explicitly showing alias mappings.

Previously, the error only said:

  • message.timeout.ms must be greater than linger.ms

This can be confusing when users configure equivalent properties with different names.

This change updates the message to:

  • delivery.timeout.ms (alias message.timeout.ms) must be greater than linger.ms (alias queue.buffering.max.ms)

Impact:

  • clearer diagnostics
  • easier troubleshooting for mixed alias usage
  • no behavioral change (message-only improvement)

Copilot AI review requested due to automatic review settings February 16, 2026 00:32
@MXLange MXLange requested a review from a team as a code owner February 16, 2026 00:32
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ MXLange
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request aims to improve the clarity of producer configuration validation error messages by adding alias information. The changes update two error message strings that are displayed when message.timeout.ms is not greater than linger.ms.

Changes:

  • Enhanced validation error messages in rd_kafka_conf_finalize() and rd_kafka_topic_conf_finalize() to show both property names and their aliases
  • No functional or behavioral changes—purely a message improvement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4432 to +4438
return "`delivery.timeout.ms` "
"(alias "
"`message.timeout.ms`) "
"must be greater than "
"`linger.ms` "
"(alias "
"`queue.buffering.max.ms`)";
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The alias relationships in this error message are backwards. According to the configuration definitions:

  • message.timeout.ms (line 1730) is the primary/canonical property, and delivery.timeout.ms (line 1742) is an alias for it
  • queue.buffering.max.ms (line 1579) is the primary/canonical property, and linger.ms (line 1588) is an alias for it

The error message should say:

  • message.timeout.ms (alias delivery.timeout.ms) must be greater than queue.buffering.max.ms (alias linger.ms)

This would correctly show the canonical property first, followed by its alias in parentheses.

Suggested change
return "`delivery.timeout.ms` "
"(alias "
"`message.timeout.ms`) "
"must be greater than "
"`linger.ms` "
"(alias "
"`queue.buffering.max.ms`)";
return "`message.timeout.ms` "
"(alias "
"`delivery.timeout.ms`) "
"must be greater than "
"`queue.buffering.max.ms` "
"(alias "
"`linger.ms`)";

Copilot uses AI. Check for mistakes.
Comment on lines +4514 to +4516
return "`delivery.timeout.ms` "
"(alias `message.timeout.ms`) must be greater than "
"`linger.ms` (alias `queue.buffering.max.ms`)";
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The alias relationships in this error message are backwards. According to the configuration definitions:

  • message.timeout.ms (line 1730) is the primary/canonical property, and delivery.timeout.ms (line 1742) is an alias for it
  • queue.buffering.max.ms (line 1579) is the primary/canonical property, and linger.ms (line 1588) is an alias for it

The error message should say:

  • message.timeout.ms (alias delivery.timeout.ms) must be greater than queue.buffering.max.ms (alias linger.ms)

This would correctly show the canonical property first, followed by its alias in parentheses.

Suggested change
return "`delivery.timeout.ms` "
"(alias `message.timeout.ms`) must be greater than "
"`linger.ms` (alias `queue.buffering.max.ms`)";
return "`message.timeout.ms` "
"(alias `delivery.timeout.ms`) must be greater than "
"`queue.buffering.max.ms` (alias `linger.ms`)";

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants