-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GH-2762: Fix Topic Check with Consumer Overrides #2763
Conversation
Resolves spring-projects#2762 When checking for missing topics, the admin was created with the raw consumer factory properties and did not apply any overriding consumer properties in the `ContainerProperties`. Apply the overrides before creating the admin. Pull up a method that merges default properties (if any) because we have to iterate over the hash table because the user might have used `put()` instead of `setProperty()` to set properties. **cherry-pick to 2.9.x**
* | ||
*/ | ||
@EmbeddedKafka(topics = "mtccac") | ||
public class MissingTopicCheckOverrideAdminConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional do not use a *Tests
suffix?
* | ||
*/ | ||
@EmbeddedKafka(topics = "mtccac") | ||
public class MissingTopicCheckOverrideAdminConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/home/runner/work/spring-kafka/spring-kafka/spring-kafka/src/test/java/org/springframework/kafka/listener/MissingTopicCheckOverrideAdminConfigTests.java:46: error: class MissingTopicCheckOverrideAdminConfig is public, should be declared in a file named MissingTopicCheckOverrideAdminConfig.java
public class MissingTopicCheckOverrideAdminConfig {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird; it is correct locally.
... and cherry-picked to |
Resolves #2762
When checking for missing topics, the admin was created with the raw consumer factory properties and did not apply any overriding consumer properties in the
ContainerProperties
.Apply the overrides before creating the admin.
Pull up a method that merges default properties (if any) because we have to iterate over the hash table because the user might have used
put()
instead ofsetProperty()
to set properties.cherry-pick to 2.9.x