-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassCastException on attempt to get bootstrap server from SenderOption/ReceiverOptions #374
Comments
As a workaround, I did this:
This is an example for the producer side, the same holds for the consumer side.
|
Yes, a have also used such workaround, it works. |
Hey all, I also came across this class cast exception when using Spring Boot. I opened the merge request #376 to fix it in the library. Let's see how it goes. |
Resolves #374 * support read bootstrap server config when it is defined as list * update copyright year of the affected classes to 2024
Expected Behavior
SenderOptions#bootstrapServers
andReceiverOptions#bootstrapServers
should sucessffully return bootstrap.servers config property valueActual Behavior
SenderOptions#bootstrapServers
andReceiverOptions#bootstrapServers
throw next ClassCastException:that is because

SenderOptions#producerProperty
returns an instance of Object class, in case ofBOOTSTRAP_SERVERS_CONFIG
it is an object of List and it can not be casted to a StringSteps to Reproduce
Possible Solution
Your Environment
netty
, ...):java -version
): 18uname -a
): MacOS 13.4The text was updated successfully, but these errors were encountered: