Looking at 
org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(List<String>, 
ClientDnsLookup) shows that error message is referring to a singular url from 
the list.  So the issue is earlier in the chain - the list is not being decoded 
from the CSV.

> On 12 Sep 2024, at 03:03, Josep Prat <josep.p...@aiven.io.INVALID> wrote:
> 
> Hi Bart,
> 
> I'm not an expert in this area, but looking at the change [1] in question
> and the usage of this regex, I'd say it was never the intention to accept
> comma separated hosts with ports (and optional protocol).
> The only 2 usages of HOST_PORT_PATTERN can be found in lines 538 [2] and
> 548 [3] in the same Utils class. Also looking at the tests it seems the
> expectation has always been to parse a single host with a port pattern
> (with optional protocol).
> 
> [1]: https://github.com/apache/kafka/pull/16048
> [2]:
> https://github.com/apache/kafka/blob/3.8/clients/src/main/java/org/apache/kafka/common/utils/Utils.java#L538
> [3]:
> https://github.com/apache/kafka/blob/3.8/clients/src/main/java/org/apache/kafka/common/utils/Utils.java#L548
> [4]:
> https://github.com/apache/kafka/blob/3.8/clients/src/test/java/org/apache/kafka/common/utils/UtilsTest.java#L104
> 
> Best,
> 
> On Wed, Sep 11, 2024 at 4:23 PM Hamer, Bart <bart.ha...@tennet.eu> wrote:
> 
>> Hi,
>> 
>> One of our Quarkus applications connects to Kafka topics using the
>> *kafka-clients* library. Quarkus provides support for Apache Kafka
>> through the SmallRye Reactive Messaging
>> <https://smallrye.io/smallrye-reactive-messaging/> framework. According
>> to the SmallRye documentation the *bootstrap.servers* property in the
>> application.properties file should contain a comma separated list (see the 
>> *Configuration
>> Reference* section on this page:
>> https://smallrye.io/smallrye-reactive-messaging/smallrye-reactive-messaging/3.4/kafka/kafka.html).
>> With kafka-clients v3.7.1 this worked fine, but after upgrading to v3.8.0
>> starting the application fails with this exception:
>> 
>> org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
>> Caused by: org.apache.kafka.common.config.ConfigException: Invalid url in
>> bootstrap.servers: kafka://test1:9094,kafka://test2:9094
>> 
>> This is caused by the changed regex pattern named HOST_PORT_PATTERN in the
>> *org.apache.kafka.common.utils.Utils* class, which no longer accepts a
>> comma separated list.  Could you please look into this?
>> Thanks!
>> 
>> Met vriendelijke groeten / Kind regards / Mit freundlichen Grüßen,
>> 
>> 
>> 
>> *Bart Hamer*
>> 
>> Software Specialist
>> 
>> BTO-SM-BAM
>> 
>> 
>> 
>> *Aanwezig: ma/di/wo/do*
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> *M*
>> 
>> +31 (0)6 46 94 13 75
>> 
>> *E*
>> 
>> *bart.ha...@tennet.eu <bart.ha...@tennet.eu>*
>> 
>> *I*
>> 
>> *www.tennet.eu <http://www.tennet.eu> *
>> 
>> 
>> 
>> TenneT TSO B.V.
>> Utrechtseweg 310
>> Arnhem
>> Postbus 718
>> 6800 AS Arnhem
>> Nederland
>> 
>> 
>> 
>> *Handelsregister:* Arnhem  09155985
>> 
>> Denk aan het milieu. Print dit bericht alleen als het noodzakelijk is.
>> 
>> 
>> 
> 
> 
> -- 
> [image: Aiven] <https://www.aiven.io>
> 
> *Josep Prat*
> Open Source Engineering Director, *Aiven*
> josep.p...@aiven.io   |   +491715557497
> aiven.io <https://www.aiven.io>   |   <https://www.facebook.com/aivencloud>
>  <https://www.linkedin.com/company/aiven/>   <https://twitter.com/aiven_io>
> *Aiven Deutschland GmbH*
> Alexanderufer 3-7, 10117 Berlin
> Geschäftsführer: Oskari Saarenmaa, Hannu Valtonen,
> Anna Richardson, Kenneth Chen
> Amtsgericht Charlottenburg, HRB 209739 B

Reply via email to