Improve linger/timeout validation error message with aliases#5314
Improve linger/timeout validation error message with aliases#5314MXLange wants to merge 1 commit intoconfluentinc:masterfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
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()andrd_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.
| return "`delivery.timeout.ms` " | ||
| "(alias " | ||
| "`message.timeout.ms`) " | ||
| "must be greater than " | ||
| "`linger.ms` " | ||
| "(alias " | ||
| "`queue.buffering.max.ms`)"; |
There was a problem hiding this comment.
The alias relationships in this error message are backwards. According to the configuration definitions:
message.timeout.ms(line 1730) is the primary/canonical property, anddelivery.timeout.ms(line 1742) is an alias for itqueue.buffering.max.ms(line 1579) is the primary/canonical property, andlinger.ms(line 1588) is an alias for it
The error message should say:
message.timeout.ms(aliasdelivery.timeout.ms) must be greater thanqueue.buffering.max.ms(aliaslinger.ms)
This would correctly show the canonical property first, followed by its alias in parentheses.
| 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`)"; |
| return "`delivery.timeout.ms` " | ||
| "(alias `message.timeout.ms`) must be greater than " | ||
| "`linger.ms` (alias `queue.buffering.max.ms`)"; |
There was a problem hiding this comment.
The alias relationships in this error message are backwards. According to the configuration definitions:
message.timeout.ms(line 1730) is the primary/canonical property, anddelivery.timeout.ms(line 1742) is an alias for itqueue.buffering.max.ms(line 1579) is the primary/canonical property, andlinger.ms(line 1588) is an alias for it
The error message should say:
message.timeout.ms(aliasdelivery.timeout.ms) must be greater thanqueue.buffering.max.ms(aliaslinger.ms)
This would correctly show the canonical property first, followed by its alias in parentheses.
| 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`)"; |
Improves the producer configuration validation error message by explicitly showing alias mappings.
Previously, the error only said:
This can be confusing when users configure equivalent properties with different names.
This change updates the message to:
Impact: