The Consolidate() and Validate() methods on KafkaProducerSettings should both do null-checks or both check for empty string
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
If you have an empty connection-string the KafkaProducerSettings.Consolidate() only checks for null so it can overwrite the Config.BootstrapServers with an empty string, but the Validate() doesnt allow for an empty string so it will throw an exception.
### Expected Behavior
If there is a reason to allow an empty string for the BootstrapServers property, the Validate() should only check for null, if not the Consolidate() should not overwrite the BootstrapServers.
### Steps To Reproduce
Set the BootstrapServers from config or in the configureSettings-action and have an empty string in the ConnectionString-section of the config and the Validate() method will throw the exception
### Exceptions (if any)
_No response_
### .NET Version info
8,9
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.