-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ContainerProperties from KafkaListenerContainerFactory are dropped #1770
Comments
If that were the case, nothing would work. The properties are copied in later; see Lines 402 to 405 in 1c79866
|
Hi, mhh, I think I see now where the confusion comes from: when I do: makes sense? |
My apologies; I see it does NOT work in that case. Investigating... |
The client Id comes from the endpoint (populated from the If you want to change it programmatically, use a container customizer instead... factory.setContainerCustomizer(container -> {
container.getContainerProperties().setClientId("client-for-"
+ container.getContainerProperties().getTopics()[0]);
}); |
Resolves spring-projects#1770 The clientId property, if set on the container factory, is overwritten by an empty String if not defined on the annotation. Check for an empty String (groupId too). **cherry-pick to 2.6.x**
No, worries. |
Resolves #1770 The clientId property, if set on the container factory, is overwritten by an empty String if not defined on the annotation. Check for an empty String (groupId too). **cherry-pick to 2.6.x** * Use simpler JavaUtils method.
Resolves #1770 The clientId property, if set on the container factory, is overwritten by an empty String if not defined on the annotation. Check for an empty String (groupId too). **cherry-pick to 2.6.x** * Use simpler JavaUtils method.
Hi,
I think the overwritten method here
spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/config/ConcurrentKafkaListenerContainerFactory.java
Line 61 in 1c79866
has a bug, as that it does not use the already existing container properties from super class org.springframework.kafka.config.AbstractKafkaListenerContainerFactory.containerProperties
So it basically drops any configuration like container clientId (!)
What do you think, bug or feature?
The text was updated successfully, but these errors were encountered: