[ 
https://issues.apache.org/jira/browse/KAFKA-18171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912548#comment-17912548
 ] 

Nadina Florea edited comment on KAFKA-18171 at 1/13/25 3:16 PM:
----------------------------------------------------------------

Hello, 

I encountered a similar issue while upgrading my project from Spring Boot 3.3.7 
(using kafka_clients 3.7.2) to Spring Boot 3.4.1 (using kafka_clients 3.8.1).

The issues arises when the _bootsratp.servers_ property is defined in a yaml 
file using multiline syntax (> of lists), which introduces newline characters 
into the configuration, for example: 
{code:java}
bootstrap.servers: >-
  br1:9092,
  br2:9092,
  br3:9092,
  br4:9092{code}
This was not a problem in Kafka Clients 3.7.x, but with 3.8.x strict validation 
was introduced via KAFKA-17584. 

The validation now throws the following error when encountering newline 
characters: {color:#0747a6}org.apache.kafka.common.config.ConfigException: 
Invalid url in bootstrap.servers{color}

 

{color:#172b4d}However, I'm also using *Apache Camel Kafka component* in my 
application, and the issue only occurs when Camel Kafka processes the 
bootsrap.servers config (when I donwngrade to kafka_clients 3.7.x, this issue 
doesn't occur).{color}

{color:#172b4d}It seems that Camel Kafka may not handle the stricter validation 
introduced in Kafka 3.8.x.{color}

 

Could you please clarify if this is an intentional behavior with Kafka 3.8.x, 
or if this should be considered a bug?

Should I expect a fix from Camel kafka to address this incompatibility?

 

{color:#172b4d}Thank you!{color}


was (Author: JIRAUSER308349):
Hello, 

I encountered a similar issue while upgrading my project from Spring Boot 3.3.7 
(using kafka_clients 3.7.2) to Spring Boot 3.4.1 (using kafka_clients 3.8.1).

The issues arises when the _bootsratp.servers_ property is defined in a yaml 
file using multiline syntax (> of lists), which introduces newline characters 
into the configuration, for example: 
{code:java}
bootstrap.servers: >-
  br1:9092,
  br2:9092,
  br3:9092,
  br4:9092{code}
This was not a problem in Kafka Clients 3.7.x, but with 3.8.x strict validation 
was introduced via KAFKA-17584. 

The validation now throws the following error when encountering newline 
characters: {color:#0747a6}org.apache.kafka.common.config.ConfigException: 
Invalid url in bootstrap.servers{color}

{color:#172b4d}Was the possibility of newline characters in yaml configurations 
considered during the design of KAFKA-17584?{color}

 

{color:#172b4d}Is it behavior intentional or should it be considered a 
bug?{color}

{color:#172b4d}If it is a bug, we kindly request that it be prioritized as it 
impacts users upgrading from previous versions where these 
configurations.{color}

 

{color:#172b4d}Thank you!{color}

> 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
>            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)

Reply via email to