[jira] [Updated] (KAFKA-10713) Surprising behaviour when bootstrap servers are separated by semicolons

2020-12-09 Thread Tom Bentley (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-10713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Bentley updated KAFKA-10713:

Fix Version/s: (was: 2.8.0)

> Surprising behaviour when bootstrap servers are separated by semicolons
> ---
>
> Key: KAFKA-10713
> URL: https://issues.apache.org/jira/browse/KAFKA-10713
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Mickael Maison
>Assignee: Tom Bentley
>Priority: Major
>
> When creating a Kafka client with {{bootstrap.servers}} set to 
> "kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.
> For once, there's no warning or error messages. The client will connect and 
> start working. However, it will only use the hostname after the last 
> semicolon as bootstrap server!
> The configuration {{bootstrap.servers}} is defined as a {{List}} in 
> {{AbstractConfig}}. So from a configuration point of view, 
> "kafka-0:9092;kafka-1:9092;kafka-2:9092" is a single entry.
> Then, {{Utils.getHost()}} returns "kafka-2" when parsing that string.
> {code:java}
> assertEquals("kafka-2", getHost("kafka-1:9092;kafka-1:9092;kafka-2:9092"));
> {code}
> So the client ends up with a single bootstrap server! 
> I believe semicolon are not valid characters in hostname/domain names, so we 
> should be able to provide better validation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (KAFKA-10713) Surprising behaviour when bootstrap servers are separated by semicolons

2020-11-12 Thread Mickael Maison (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-10713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mickael Maison updated KAFKA-10713:
---
Description: 
When creating a Kafka client with {{bootstrap.servers}} set to 
"kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.

For once, there's no warning or error messages. The client will connect and 
start working. However, it will only use the hostname after the last semicolon 
as bootstrap server!

The configuration {{bootstrap.servers}} is defined as a {{List}} in 
{{AbstractConfig}}. So from a configuration point of view, 
"kafka-0:9092;kafka-1:9092;kafka-2:9092" is a single entry.

Then, {{Utils.getHost()}} returns "kafka-2" when parsing that string.
{code:java}
assertEquals("kafka-2", getHost("kafka-1:9092;kafka-1:9092;kafka-2:9092"));
{code}
So the client ends up with a single bootstrap server! 

I believe semicolon are not valid characters in hostname/domain names, so we 
should be able to provide better validation.

  was:
When creating a Kafka client with bootstrap.servers set to 
"kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.

For once, there's no warning or error messages. The client will connect and 
start working. However, it will only use the hostname after the last semicolon! 
In this example, it will only have kafka-2 as bootstrap server

assertEquals("kafka-2", getHost("kafka-1:1234;kafka-1:1234;kafka-2:1234"));

I believe semicolon are not valid characters in hostname/domain names, so we 
should be able to provide better validation.


> Surprising behaviour when bootstrap servers are separated by semicolons
> ---
>
> Key: KAFKA-10713
> URL: https://issues.apache.org/jira/browse/KAFKA-10713
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Mickael Maison
>Priority: Major
>
> When creating a Kafka client with {{bootstrap.servers}} set to 
> "kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.
> For once, there's no warning or error messages. The client will connect and 
> start working. However, it will only use the hostname after the last 
> semicolon as bootstrap server!
> The configuration {{bootstrap.servers}} is defined as a {{List}} in 
> {{AbstractConfig}}. So from a configuration point of view, 
> "kafka-0:9092;kafka-1:9092;kafka-2:9092" is a single entry.
> Then, {{Utils.getHost()}} returns "kafka-2" when parsing that string.
> {code:java}
> assertEquals("kafka-2", getHost("kafka-1:9092;kafka-1:9092;kafka-2:9092"));
> {code}
> So the client ends up with a single bootstrap server! 
> I believe semicolon are not valid characters in hostname/domain names, so we 
> should be able to provide better validation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (KAFKA-10713) Surprising behaviour when bootstrap servers are separated by semicolons

2020-11-12 Thread Mickael Maison (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-10713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mickael Maison updated KAFKA-10713:
---
Description: 
When creating a Kafka client with bootstrap.servers set to 
"kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.

For once, there's no warning or error messages. The client will connect and 
start working. However, it will only use the hostname after the last semicolon! 
In this example, it will only have kafka-2 as bootstrap server

assertEquals("kafka-2", getHost("kafka-1:1234;kafka-1:1234;kafka-2:1234"));

I believe semicolon are not valid characters in hostname/domain names, so we 
should be able to provide better validation.

  was:
When creating a Kafka client with bootstrap.servers set to 
"kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.

For once, there's no warning or error messages. The client will connect and 
start working. However, it will only use the hostname after the last semicolon! 
kafka-2 in this example!

assertEquals("kafka-2", getHost("kafka-1:1234;kafka-1:1234;kafka-2:1234"));

I believe semicolon are not valid characters in hostname/domain names, so we 
should be able to provide better validation.


> Surprising behaviour when bootstrap servers are separated by semicolons
> ---
>
> Key: KAFKA-10713
> URL: https://issues.apache.org/jira/browse/KAFKA-10713
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Mickael Maison
>Priority: Major
>
> When creating a Kafka client with bootstrap.servers set to 
> "kafka-0:9092;kafka-1:9092;kafka-2:9092", it has a strange behaviour.
> For once, there's no warning or error messages. The client will connect and 
> start working. However, it will only use the hostname after the last 
> semicolon! In this example, it will only have kafka-2 as bootstrap server
> assertEquals("kafka-2", getHost("kafka-1:1234;kafka-1:1234;kafka-2:1234"));
> I believe semicolon are not valid characters in hostname/domain names, so we 
> should be able to provide better validation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)