[ https://issues.apache.org/jira/browse/KAFKA-18171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921540#comment-17921540 ]
Chia-Ping Tsai commented on KAFKA-18171: ---------------------------------------- The "strict check" was introduced by KAFKA-16824 and KAFKA-16946. the pattern of parsing host/port was changed from `.*?\[?([0-9a-zA-Z\-%._:]*)\]?:([0-9]+)` to `^(?:[0-9a-zA-Z\-%._]*://)?\[?([0-9a-zA-Z\-%._:]*)]?:([0-9]+)` That results in the different output when parsing `140.2.15.25:9092 140.2.15.26:9092 140.2.15.27:9092` before: 140.2.15.27:9092 after: exception as it can't get correct host and port Version 3.7 incorrectly returns only one bootstrap server. Although this seems like a bug, it's currently treated as intended behavior ... --- I propose that we follow [~ijuma] suggestion and revert the strict validation introduced in Kafka versions 3.9 and 3.8. However, we should include a warning message to alert users that they are using a malformed format. For your information, [~jsancio], as you raised KAFKA-16824. [~pranavt84] WDYT? do you have free cycle to file a PR based on above comment? If not, I can take over this jira. thanks! > Unexpected Change in bootstrap.servers Behavior After Upgrade to 3.8.0 > ---------------------------------------------------------------------- > > Key: KAFKA-18171 > URL: https://issues.apache.org/jira/browse/KAFKA-18171 > Project: Kafka > Issue Type: Bug > Components: config > Affects Versions: 3.8.0 > Environment: Operating system: windows 11 > Kafka Version: 3.8.0 > Previous Version: 3.7.0 > Configuration: > - `bootstrap.servers: "140.2.15.25:9092 140.2.15.26:9092 > 140.2.15.27:9092"` > Reporter: Beatriz Aparecida de Freitas Rodrigues > Assignee: Pranav Kumar Tiwari > Priority: Major > > After upgrading from Kafka version *3.7.0* to 3.8.0, I encountered an issue > with the configuration of the `bootstrap.servers` property. > In previous versions, it was possible to configure the `bootstrap.servers` > with space-separated URLs, like this: > {code:java} > bootstrap.servers: "140.2.15.25:9092 140.2.15.26:9092 140.2.15.27:9092" > {code} > > However, with version {*}3.8.0{*}, this configuration results in the > following exception: > > {code:java} > org.apache.kafka.common.config.ConfigException: Invalid url in > bootstrap.servers: 140.2.15.25:9092 140.2.15.26:9092 140.2.15.27:9092 {code} > > > The configuration only works correctly if the URLs are separated by commas, > as shown below: > > {code:java} > bootstrap.servers: "140.2.15.25:9092,140.2.15.26:9092,140.2.15.27:9092" {code} > > > This behavior appears to be a change from previous versions where > space-separated URLs were accepted. > *Reproducible Example:* > To demonstrate the issue, I created a minimal project that reproduces the > problem. You can find it here: > [GitHub Repository|https://github.com/BeatrizRodrigues/kafka-config-test] > *Question:* > Is this the expected behavior for version *3.8.0* ? Was support for > space-separated `bootstrap.servers` values intentionally deprecated, or is > this a bug introduced in the latest release? > Looking forward to clarification on whether this is an intentional change or > a bug. Thank you! -- This message was sent by Atlassian Jira (v8.20.10#820010)