iit2009060 commented on code in PR #20723:
URL: https://github.com/apache/kafka/pull/20723#discussion_r2506331944
##########
streams/src/test/java/org/apache/kafka/streams/StreamsConfigTest.java:
##########
@@ -442,6 +442,51 @@ public void
shouldOverrideAdminDefaultAdminClientEnableTelemetry() {
assertTrue((boolean)
returnedProps.get(AdminClientConfig.ENABLE_METRICS_PUSH_CONFIG));
}
+ @Test
+ public void testAutoCreateTopicsCannotBeOverriddenForStreamsConsumers() {
+ // User tries to override the setting
+
props.put(StreamsConfig.consumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.restoreConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.globalConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.mainConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
Review Comment:
@mjsax It will log for each of the failure. As for every failure we do not
fail the test , but log a error. In our case it will log this error 6 times.
[2025-11-08 12:14:54,861] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
[2025-11-08 12:14:54,863] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
[2025-11-08 12:14:54,866] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
[2025-11-08 12:14:54,866] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
[2025-11-08 12:14:54,867] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
[2025-11-08 12:14:54,867] ERROR Unexpected user-specified consumer config
'allow.auto.create.topics' found. User setting (true) will be ignored and the
Streams default setting (false) will be used.
(org.apache.kafka.streams.StreamsConfig:1666)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]